diff --git a/caches/FileCache.php b/caches/FileCache.php index 0e010678..c8e49821 100644 --- a/caches/FileCache.php +++ b/caches/FileCache.php @@ -14,7 +14,7 @@ class FileCache implements CacheInterface { public function saveData($datas){ $writeStream = file_put_contents($this->getCacheFile(), json_encode($datas, JSON_PRETTY_PRINT)); - if($writeStream === FALSE) { + if($writeStream === false) { throw new \Exception("Cannot write the cache... Do you have the right permissions ?"); } diff --git a/lib/error.php b/lib/error.php index 4a814b19..ae18f6ff 100644 --- a/lib/error.php +++ b/lib/error.php @@ -1,30 +1,28 @@ ' - . $calling['function'] . ' - ' - . $text; + $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3); + $calling = $backtrace[2]; + $message = $calling['file'] . ':' + . $calling['line'] . ' class ' + . $calling['class'] . '->' + . $calling['function'] . ' - ' + . $text; - error_log($message); + error_log($message); } - -?> diff --git a/lib/validation.php b/lib/validation.php index c6c3e279..ccc45611 100644 --- a/lib/validation.php +++ b/lib/validation.php @@ -53,7 +53,6 @@ function validateData(&$data,$parameters){ return $filteredValue; }; - if(!is_array($data)) return false; @@ -99,5 +98,3 @@ function validateData(&$data,$parameters){ return true; } - -?>