Commit 8cefdda0 authored by Benoit Mortier's avatar Benoit Mortier
Browse files

Fixes: #674 cleaning code for php 5.4

parent 9eb4f8d3
......@@ -23,7 +23,7 @@
/*!
* \file php_setup.inc
* Source code for php_setup
*/
*/
require_once ("variables.inc");
/*!
......@@ -36,7 +36,7 @@ require_once ("variables.inc");
* \param string $errfile The error filename
*
* \param string $errline The error line
*/
*/
function gosaRaiseError($errno, $errstr, $errfile, $errline)
{
global $error_collector,$config, $error_collector_mailto;
......@@ -172,19 +172,21 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
$type= "-";
}
$args= "";
if (isset($ct['args'])){
foreach ($ct['args'] as $arg){
if (isset($ct['args'])) {
foreach ($ct['args'] as $arg) {
/* Avoid convertig object to string errors */
if(is_object($arg)){
if (is_object($arg)) {
$arg = "CLASS: ".get_class($arg);
} elseif (is_array($arg)) { /* Avoid convertig array to string errors */
$arg = "array(".implode(','$arg).")";
}
$args.= "\"$arg\", ";
}
}
$args= preg_replace("/, $/", "", $args);
if ($args == ""){
$args = preg_replace("/, $/", "", $args);
if ($args == "") {
$args= "-";
}
if(isset($ct['file'])) {
......@@ -230,7 +232,7 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
/*!
* \brief Dummy error handler
*/
*/
function dummy_error_handler()
{
}
......
......@@ -205,9 +205,9 @@ class Step_Checks extends setup_step
/* Session auto start must be turned off */
$session_auto_start = ini_get('session.auto_start');
$N = "session.auto_start = <b>"._("Off")."</b>";
$D = _("In Order to use FusionDirectory without any trouble, the session.auto_register option in your php.ini should be set to 'Off'.");
$D = _("In Order to use FusionDirectory without any trouble, the session.auto_start option in your php.ini should be set to 'Off'.");
$S = _("Search for 'session.auto_start' in your php.ini and set it to 'Off'.");
$R = !$session_auto_start['local_value'];
$R = !$session_auto_start;
$M = TRUE;
$this->config_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment