diff --git a/admin/configuration.php b/admin/configuration.php index 43d0b48da..ece27649e 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -350,7 +350,7 @@ switch ($page['section']) { $out = array(); $order_by = trim($conf['order_by_inside_category']); - $order_by = str_replace('ORDER BY ', null, $order_by); + $order_by = str_replace('ORDER BY ', false, $order_by); $order_by = explode(', ', $order_by); } diff --git a/include/template.class.php b/include/template.class.php index cc1747bd6..b88d1a7dd 100644 --- a/include/template.class.php +++ b/include/template.class.php @@ -702,7 +702,7 @@ class Template */ function block_html_head($params, $content) { - $content = trim($content); + $content = isset($content) ? trim($content) : ''; if ( !empty($content) ) { // second call $this->html_head_elements[] = $content; @@ -718,7 +718,7 @@ class Template */ function block_html_style($params, $content) { - $content = trim($content); + $content = isset($content) ? trim($content) : ''; if ( !empty($content) ) { // second call $this->html_style .= "\n".$content; @@ -908,7 +908,7 @@ var s,after = document.getElementsByTagName(\'script\')[document.getElementsByTa */ function block_footer_script($params, $content) { - $content = trim($content); + $content = isset($content) ? trim($content) : ''; if ( !empty($content) ) { // second call