diff --git a/contributions/page.blocks/controller/base/templated.block.cls.php b/contributions/page.blocks/controller/base/templated.block.cls.php index 66a77032..c3a8ba04 100644 --- a/contributions/page.blocks/controller/base/templated.block.cls.php +++ b/contributions/page.blocks/controller/base/templated.block.cls.php @@ -38,7 +38,7 @@ public function __construct($name, $title, $template, $index = 1000, $position = * @return IView */ protected function create_view($template) { - $view = ViewFactory::create_view(IViewFactory::MESSAGE, $template, $page_data); + $view = ViewFactory::create_view(IViewFactory::MESSAGE, $template); $view->assign('block', $this); $this->configure_view($view); return $view; diff --git a/gyro/core/behaviour/base/commandbase.cls.php b/gyro/core/behaviour/base/commandbase.cls.php index 769159b5..e2e9f83f 100644 --- a/gyro/core/behaviour/base/commandbase.cls.php +++ b/gyro/core/behaviour/base/commandbase.cls.php @@ -179,7 +179,7 @@ protected function serialize_params($params) { $arr = array(); foreach($params as $key => $value) { $arr[] = $key; - $arr[] = $value; + $arr[] = is_array($value) ? serialize($value) : $value; } $ret = implode(GYRO_COMMAND_SEP, $arr); } diff --git a/gyro/core/controller/base/renderdecorators/cacherenderdecorator.cls.php b/gyro/core/controller/base/renderdecorators/cacherenderdecorator.cls.php index 6f9fe31d..10b7cb43 100644 --- a/gyro/core/controller/base/renderdecorators/cacherenderdecorator.cls.php +++ b/gyro/core/controller/base/renderdecorators/cacherenderdecorator.cls.php @@ -13,7 +13,7 @@ class CacheRenderDecorator extends RenderDecoratorBase { * * @var ICacheManager */ - private $chache_manager = null; + private $cache_manager = null; /** * Constructor diff --git a/gyro/core/controller/base/routes/parameterizedroute.cls.php b/gyro/core/controller/base/routes/parameterizedroute.cls.php index 44458e4c..b7dc1a13 100644 --- a/gyro/core/controller/base/routes/parameterizedroute.cls.php +++ b/gyro/core/controller/base/routes/parameterizedroute.cls.php @@ -406,7 +406,7 @@ protected function build_url_path($params) { $path = $this->replace_path_variable($path, $v, $params->$func_name()); } } else { - $path = $this->replace_path_variable($path, $v, $params->$v); + $path = $this->replace_path_variable($path, $v, $params->$v ?? null); } } } else if (is_array($params)) { diff --git a/gyro/core/controller/tools/sorter.cls.php b/gyro/core/controller/tools/sorter.cls.php index 54960c21..c8dcaabd 100644 --- a/gyro/core/controller/tools/sorter.cls.php +++ b/gyro/core/controller/tools/sorter.cls.php @@ -109,7 +109,7 @@ public function prepare_view($view) { } $this->sorter_data['columns'] = $arr_colums; - $this->sorter_data['current_column'] = $current_column; + $this->sorter_data['current_column'] = $current_column ?? null; $view->assign('sorter_data', $this->sorter_data); } diff --git a/gyro/core/lib/components/mailmessage.cls.php b/gyro/core/lib/components/mailmessage.cls.php index 79859505..ebd398d7 100644 --- a/gyro/core/lib/components/mailmessage.cls.php +++ b/gyro/core/lib/components/mailmessage.cls.php @@ -262,7 +262,7 @@ protected function safety_check_exploit_strings(&$value, $type, $beginLineOnly = ); $temp = preg_replace($find, '**!HEADERINJECTION!**', $value); if (strpos($temp, '**!HEADERINJECTION!**') !== false) { - $err->append('%type: "To:", "Bcc:", "Subject:" and other reserved words are not allowed.', 'core', array('%type' => $type)); + $err->append(tr('%type: "To:", "Bcc:", "Subject:" and other reserved words are not allowed.', 'core', array('%type' => $type))); } return $err; diff --git a/gyro/core/lib/interfaces/idbwhere.cls.php b/gyro/core/lib/interfaces/idbwhere.cls.php index 02b2ab27..8cddc661 100644 --- a/gyro/core/lib/interfaces/idbwhere.cls.php +++ b/gyro/core/lib/interfaces/idbwhere.cls.php @@ -7,7 +7,7 @@ * @author Gerd Riesselmann * @ingroup Interfaces */ -interface IDBWhere extends IDBSQLBuilder { +interface IDBWhere extends IDBSqlBuilder { const LOGIC_AND = 'AND'; const LOGIC_OR = 'OR'; diff --git a/gyro/core/model/base/fields/dbfield.time.cls.php b/gyro/core/model/base/fields/dbfield.time.cls.php index 6aebdb49..c1b150c8 100644 --- a/gyro/core/model/base/fields/dbfield.time.cls.php +++ b/gyro/core/model/base/fields/dbfield.time.cls.php @@ -24,7 +24,7 @@ protected function get_db_now_constant() { * @return string */ protected function format_date_value($value) { - return $this->quote(GyroDate::mysql_time($value, false)); + return $this->quote(GyroDate::mysql_time($value)); } /** diff --git a/gyro/core/view/widgets/input/base/base.input.widget.php b/gyro/core/view/widgets/input/base/base.input.widget.php index 37a3ead9..e72691e2 100644 --- a/gyro/core/view/widgets/input/base/base.input.widget.php +++ b/gyro/core/view/widgets/input/base/base.input.widget.php @@ -76,7 +76,7 @@ protected function input_build_widget($params, $name, $title, $value, $policy) { * Create default attribute array */ protected function create_default_attributes($params, $name, $policy) { - $id = strtr(arr::get_item($params, 'id', $name), '[]', '__'); + $id = strtr(Arr::get_item($params, 'id', $name), '[]', '__'); $attrs = array( 'id' => $id ); @@ -110,7 +110,7 @@ protected function render_label($widget, $html_attrs, $params, $name, $title, $v $lbl_class = Arr::get_item($params, 'label:class', ''); $label = ''; if ($title) { - $notes = Cast::int(arr::get_item($params, 'notes', 0)); + $notes = Cast::int(Arr::get_item($params, 'notes', 0)); if ($notes > 0) { $title .= ' '. html::span(str_repeat('*', $notes), 'notes'); } diff --git a/gyro/modules/json/lib/helpers/converters/json.cls.php b/gyro/modules/json/lib/helpers/converters/json.cls.php index 369af08b..7905c6c8 100644 --- a/gyro/modules/json/lib/helpers/converters/json.cls.php +++ b/gyro/modules/json/lib/helpers/converters/json.cls.php @@ -64,7 +64,7 @@ public function encode($data, $params = false) { include_once 'Services/JSON.php'; if (class_exists('Services_JSON')) { $json = new Services_JSON(); - return $json->encode($str); + return $json->encode($data); } throw new Exception(tr('No JSON implementation found', 'ajax')); } diff --git a/gyro/modules/offline/enabled.inc.php b/gyro/modules/offline/enabled.inc.php index 4b77fae7..8f6fee5f 100644 --- a/gyro/modules/offline/enabled.inc.php +++ b/gyro/modules/offline/enabled.inc.php @@ -10,4 +10,4 @@ * compatabile with Apache web server (and Lighttpd, eventually) only. */ -Load::enable_module('console', 'systemupdate'); +Load::enable_module(['console', 'systemupdate']); diff --git a/gyro/modules/simpletest/3rdparty/simpletest/browser.php b/gyro/modules/simpletest/3rdparty/simpletest/browser.php index 68b2739b..f392798f 100644 --- a/gyro/modules/simpletest/3rdparty/simpletest/browser.php +++ b/gyro/modules/simpletest/3rdparty/simpletest/browser.php @@ -18,8 +18,8 @@ require_once dirname(__FILE__) . '/frames.php'; require_once dirname(__FILE__) . '/user_agent.php'; if (! SimpleTest::getParsers()) { - SimpleTest::setParsers(array(new SimpleTidyPageBuilder(), new SimplePHPPageBuilder())); - //SimpleTest::setParsers(array(new SimplePHPPageBuilder())); + SimpleTest::setParsers(array(new SimpleTidyPageBuilder(), new SimplePhpPageBuilder())); + //SimpleTest::setParsers(array(new SimplePhpPageBuilder())); } /**#@-*/ @@ -216,7 +216,7 @@ protected function createHistory() * Get the HTML parser to use. Can be overridden by * setParser. Otherwise scans through the available parsers and * uses the first one which is available. - * @return object SimplePHPPageBuilder or SimpleTidyPageBuilder + * @return object SimplePhpPageBuilder or SimpleTidyPageBuilder */ protected function getParser() { diff --git a/gyro/modules/simpletest/3rdparty/simpletest/web_tester.php b/gyro/modules/simpletest/3rdparty/simpletest/web_tester.php index 5a4fc505..38ac9843 100644 --- a/gyro/modules/simpletest/3rdparty/simpletest/web_tester.php +++ b/gyro/modules/simpletest/3rdparty/simpletest/web_tester.php @@ -523,7 +523,7 @@ public function setBrowser($browser) /** * Sets the HTML parser to use within this browser. - * @param object The parser, one of SimplePHPPageBuilder or + * @param object The parser, one of SimplePhpPageBuilder or * SimpleTidyPageBuilder. */ public function setParser($parser)