The problem I encountered before, I have been very distressed, how to solve it, and now I have finally found a solution, and now I will share it with you, the problem is as follows: Strict Standards: Only variables should be passed by reference in upload\includes\cls_template.php on line 418 Line 418: $tag_sel = array_shift(explode(' ', $tag));
Workaround 1: The problem with versions 5.3 and above should also be related to the configuration As long as line 418 splits this sentence into two sentences, there is no problem $tag_sel = array_shift(explode(' ', $tag)); Changed to:
$tag_arr = explode(' ', $tag); $tag_sel = array_shift($tag_arr); Because the parameters of array_shift are passed by reference, only specific variables can be passed by default above 5.3, and the value cannot be returned through the function In the same way, when encountering function nesting errors, they can be written separately, and the errors will be solved naturally
As: function get_dyna_libs($theme, $tmp)
{ $extsub = explode('.', $tmp); $ext = end($extsub); $tmp = basename($tmp,".$ext"); $sql = 'SELECT region, library, sort_order, id, number, type' . ' FROM ' . $GLOBALS['ecs']->table('template') . " WHERE theme = '$theme' AND filename = '" . $tmp . "' AND type > 0 AND remarks=''". ' ORDER BY region, library, sort_order'; $res = $GLOBALS['db']->getAll($sql); $dyna_libs = array(); foreach ($res AS $row)
{ $dyna_libs[$row['region']][$row['library']][] = array( 'id' => $row['id'], 'number' => $row['number'], 'type' => $row['type'] );
} return $dyna_libs;
}
set $ext = end(explode('.', $tmp)); Change $extsub = explode('.', $tmp); $ext = end($extsub);
Solution 2 (Masking Error):
Or if configured like this: error_reporting = E_ALL | E_STRICT The following settings are available in the php.ini: error_reporting = E_ALL | E_STRICT
This means that coding standards warnings are displayed. Joomla actually recommends canceling error output, which should be changed to if needed for debugging error_reporting = E_ALL & ~E_NOTICE
The problem was solved. |