diff --git a/www/admin/class_test.php b/www/admin/class_test.php index 00b6be5c..d62c2ca6 100644 --- a/www/admin/class_test.php +++ b/www/admin/class_test.php @@ -1,11 +1,11 @@ debug_output_all = 0; - $cms->debug_output_all = 1; + $login->echo_output_all = 0; + $login->print_output_all = 0; + $cms->debug_output_all = 0; $cms->echo_output_all = 0; - $cms->print_output_all = 1; + $cms->print_output_all = 0; } $cms->DATA['JS_DEBUG'] = DEBUG; ?> diff --git a/www/libs/Class.Basic.inc b/www/libs/Class.Basic.inc index 700f2af9..b6d4651f 100644 --- a/www/libs/Class.Basic.inc +++ b/www/libs/Class.Basic.inc @@ -725,7 +725,7 @@ $output = preg_replace_callback("/(href=\")?(\>)?\b($protRegex)([\w\.\-?&=+%#~,;\/]+)\b([\.\-?&=+%#~,;\/]*)(\|([^\||^#]+)(#([^\|]+))?\|)?/", function ($matches) use ($self) { - return $self->create_url($matches[1], $matches[2], $matches[3], $matches[4], $matches[5], $matches[7], $matches[9]); + return @$self->create_url($matches[1], $matches[2], $matches[3], $matches[4], $matches[5], $matches[7], $matches[9]); }, $output ); @@ -733,7 +733,7 @@ $output = preg_replace_callback("/(mailto:)?(\>)?\b([\w\.-]+)@([\w\.\-]+)\.([a-zA-Z]{2,4})\b(\|([^\||^#]+)(#([^\|]+))?\|)?/", function ($matches) use ($self) { - return $self->create_email($matches[1], $matches[2], $matches[3], $matches[4], $matches[5], $matches[7], $matches[9]); + return @$self->create_email($matches[1], $matches[2], $matches[3], $matches[4], $matches[5], $matches[7], $matches[9]); }, $output ); @@ -808,8 +808,11 @@ // get the host name without the port as given by the SELF var public function get_host_name() { - if ($_SERVER['HTTP_HOST']) + $port = ''; + if ($_SERVER['HTTP_HOST'] && preg_match("/:/", $_SERVER['HTTP_HOST'])) list($host_name, $port) = explode(":", $_SERVER['HTTP_HOST']); + elseif ($_SERVER['HTTP_HOST']) + $host_name = $_SERVER['HTTP_HOST']; else $host_name = 'NA'; $this->host_port = $port ? $port : 80; @@ -1077,6 +1080,7 @@ // xd xh xm xs xms to a timestamp.microtime format public static function StringToTime($timestring) { + $timestamp = ''; if (preg_match("/(d|h|m|s|ms)/", $timestring)) { $timegroups = array (1 => 86400, 3 => 3600, 5 => 60, 7 => 1); diff --git a/www/libs/Class.DB.IO.inc b/www/libs/Class.DB.IO.inc index 89f6584d..9f085719 100644 --- a/www/libs/Class.DB.IO.inc +++ b/www/libs/Class.DB.IO.inc @@ -652,7 +652,7 @@ { // TODO: get primary key from table name list($schema, $table) = $this->_db_return_table($this->query); - if (!$this->pk_name_table[$table]) + if (!array_key_exists($table, $this->pk_name_table) || !$this->pk_name_table[$table]) { $this->pk_name_table[$table] = $this->db_functions->_db_primary_key($table, $schema); } @@ -1321,7 +1321,7 @@ return false; } // check if this was already prepared - if (!is_array($this->prepare_cursor[$stm_name])) + if (!array_key_exists($stm_name, $this->prepare_cursor) || !is_array($this->prepare_cursor[$stm_name])) { // if this is an insert query, check if we can add a return if ($this->_check_query_for_insert($query, true))