diff --git a/cache/cache_css.php b/cache/cache_css.php index 1ad9732..a781457 100644 --- a/cache/cache_css.php +++ b/cache/cache_css.php @@ -47,6 +47,8 @@ class cache_css { public static function ident($files){ $ident = ''; foreach($files as $f){ + if(!file_exists($f->SERVERPATH())){ + throw new \SYSTEM\LOG\ERROR('Could not find file: '.$f->SERVERPATH());} $ident .= $f->SERVERPATH().';'.filemtime($f->SERVERPATH()).';';} return sha1($ident); } diff --git a/cache/cache_js.php b/cache/cache_js.php index 8b87cb4..bd85a74 100644 --- a/cache/cache_js.php +++ b/cache/cache_js.php @@ -47,6 +47,8 @@ class cache_js { public static function ident($files){ $ident = ''; foreach($files as $f){ + if(!file_exists($f->SERVERPATH())){ + throw new \SYSTEM\LOG\ERROR('Could not find file: '.$f->SERVERPATH());} $ident .= $f->SERVERPATH().';'.filemtime($f->SERVERPATH()).';';} return sha1($ident); } diff --git a/cache/cache_scss.php b/cache/cache_scss.php index 48fb8fd..b43d092 100644 --- a/cache/cache_scss.php +++ b/cache/cache_scss.php @@ -44,6 +44,8 @@ class cache_scss { * @return sha1 Returns the requested Ident */ public static function ident($file){ + if(!file_exists($file)){ + throw new \SYSTEM\LOG\ERROR('Could not find file: '.$file);} return sha1($file.';'.filemtime($file));} /** diff --git a/db/connection/ConnectionMYS.php b/db/connection/ConnectionMYS.php index 7359c46..509b182 100644 --- a/db/connection/ConnectionMYS.php +++ b/db/connection/ConnectionMYS.php @@ -26,11 +26,11 @@ class ConnectionMYS extends ConnectionAbstr { * @param int $client_flag Client Flag transmitted on connection */ public function __construct(DBInfo $dbinfo, $new_link = false, $client_flag = 0){ - $this->connection = @mysqli_connect($dbinfo->m_host, $dbinfo->m_user, $dbinfo->m_password, $new_link, $client_flag); + $this->connection = @\mysqli_connect($dbinfo->m_host, $dbinfo->m_user, $dbinfo->m_password, $new_link, $client_flag); if(!$this->connection){ die('Could not connect to Database. Check ur Database Settings.');} - if(!mysqli_select_db($this->connection, $dbinfo->m_database)){ + if(!\mysqli_select_db($this->connection, $dbinfo->m_database)){ die('Could not select Database. Check ur Database Settings.');} \mysqli_set_charset($this->connection, 'utf8'); @@ -48,7 +48,7 @@ class ConnectionMYS extends ConnectionAbstr { * @return bool Returns true or false depending on success */ public function close(){ - return mysqli_close($this->connection);} + return \mysqli_close($this->connection);} /** * Query the Connection using Prepare Statement @@ -72,7 +72,7 @@ class ConnectionMYS extends ConnectionAbstr { $binds[1] = $types ? $types : $types_; \call_user_func_array('mysqli_stmt_bind_param', $binds); //you need 2 append the parameters - thats the right way to do that. - if(!mysqli_stmt_execute($prepStmt)){ + if(!\mysqli_stmt_execute($prepStmt)){ throw new \SYSTEM\LOG\ERROR("Could not execute prepare statement: ". \mysqli_stmt_error($prepStmt));} return new \SYSTEM\DB\ResultMysqliPrepare($prepStmt,$this); diff --git a/sql/mysql/schema/system_todo.sql b/sql/mysql/schema/system_todo.sql index b6f066b..2b1cd9f 100644 --- a/sql/mysql/schema/system_todo.sql +++ b/sql/mysql/schema/system_todo.sql @@ -14,9 +14,9 @@ CREATE TABLE `system_todo` ( `server_port` INT(10) UNSIGNED NOT NULL, `request_uri` CHAR(255) NOT NULL, `post` TEXT NOT NULL, - `http_referer` CHAR(255) NOT NULL, - `http_user_agent` TEXT NOT NULL, - `user` INT(10) UNSIGNED NOT NULL, + `http_referer` CHAR(255) DEFAULT NULL, + `http_user_agent` TEXT DEFAULT NULL, + `user` INT(10) UNSIGNED DEFAULT NULL, `thrown` BIT(1) NOT NULL, `type` INT(11) NOT NULL DEFAULT '0', `count` INT(11) NOT NULL DEFAULT '1', diff --git a/system/autoload.php b/system/autoload.php index fa3ad67..e9e886c 100644 --- a/system/autoload.php +++ b/system/autoload.php @@ -40,7 +40,7 @@ class autoload { */ private static function getClassNamespaceFromClass($class){ $path_info = \pathinfo($class); - $lastslash = \strrpos($class, 92); + $lastslash = \strrpos($class, '\\'); //No Namespace found if(!$lastslash){ return array($class, '');}