+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
*/
/**
if (!isset($value) && $abort) {
if ($isThrowException) {
- throw new CRM_Core_Exception(ts("Could not find valid value for %1", array(1 => $name)));
+ throw new CRM_Core_Exception(ts("Could not find valid value for %1", [1 => $name]));
}
- CRM_Core_Error::fatal(ts("Could not find valid value for %1", array(1 => $name)));
+ CRM_Core_Error::fatal(ts("Could not find valid value for %1", [1 => $name]));
}
if (!isset($value) && $default) {
* @param array $method - '$_GET', '$_POST' or '$_REQUEST'.
*
* @return mixed
- * The value of the variable
+ * The value of the variable
*/
protected static function getValue($name, $method) {
if (isset($method[$name])) {
// http://www.php.net/manual/en/ini.core.php#ini.request-order
// http://www.php.net/manual/en/ini.core.php#ini.variables-order
- $result = array();
+ $result = [];
if ($_GET) {
$result = array_merge($result, $_GET);
}
* @param array $attributes
* The form attributes array.
*
- * @return string $value
+ * @return string
* The desired value.
*/
public static function retrieveComponent($attributes) {