From 14c689e7a344327c84260386100a347fcc4176a0 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Wed, 9 Nov 2016 19:10:40 +0100 Subject: [PATCH] [core] Fix typos --- caches/FileCache.php | 2 +- lib/error.php | 30 ++++++++++++++---------------- lib/validation.php | 3 --- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/caches/FileCache.php b/caches/FileCache.php index 0e01067..c8e4982 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 4a814b1..ae18f6f 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 c6c3e27..ccc4561 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; } - -?>