Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion gyro/core/behaviour/base/commandbase.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CacheRenderDecorator extends RenderDecoratorBase {
*
* @var ICacheManager
*/
private $chache_manager = null;
private $cache_manager = null;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion gyro/core/controller/tools/sorter.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion gyro/core/lib/components/mailmessage.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion gyro/core/lib/interfaces/idbwhere.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion gyro/core/model/base/fields/dbfield.time.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions gyro/core/view/widgets/input/base/base.input.widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down Expand Up @@ -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');
}
Expand Down
2 changes: 1 addition & 1 deletion gyro/modules/json/lib/helpers/converters/json.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
Expand Down
2 changes: 1 addition & 1 deletion gyro/modules/offline/enabled.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
* compatabile with Apache web server (and Lighttpd, eventually) only.
*/

Load::enable_module('console', 'systemupdate');
Load::enable_module(['console', 'systemupdate']);
6 changes: 3 additions & 3 deletions gyro/modules/simpletest/3rdparty/simpletest/browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
/**#@-*/

Expand Down Expand Up @@ -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()
{
Expand Down
2 changes: 1 addition & 1 deletion gyro/modules/simpletest/3rdparty/simpletest/web_tester.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down