Skip to content

Commit 3a05bd2

Browse files
author
Till Brehm
committed
Fixed #4425 Variable is initialized as string but later written to as array, throws fatal error in PHP 7.1
1 parent 59582ea commit 3a05bd2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

interface/lib/classes/listform_actions.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function onLoad()
131131
$records = $app->db->queryAllRecords($this->getQueryString($php_sort));
132132

133133
$this->DataRowColor = "#FFFFFF";
134-
$records_new = '';
134+
$records_new = array();
135135
if(is_array($records)) {
136136
$this->idx_key = $app->listform->listDef["table_idx"];
137137
foreach($records as $rec) {

interface/lib/classes/tform_base.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function loadFormDef($file, $module = '') {
173173
*/
174174
protected function _decode($record, $tab = '', $api = false) {
175175
global $app;
176-
$new_record = '';
176+
$new_record = array();
177177
if($api == false) {
178178
$table_idx = $this->formDef['db_table_idx'];
179179
if(isset($record[$table_idx])) $new_record[$table_idx] = $app->functions->intval($record[$table_idx ]);

0 commit comments

Comments
 (0)