mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 22:00:23 +02:00
[core] Fix typos
This commit is contained in:
@@ -14,7 +14,7 @@ class FileCache implements CacheInterface {
|
|||||||
public function saveData($datas){
|
public function saveData($datas){
|
||||||
$writeStream = file_put_contents($this->getCacheFile(), json_encode($datas, JSON_PRETTY_PRINT));
|
$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 ?");
|
throw new \Exception("Cannot write the cache... Do you have the right permissions ?");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,30 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
function returnError($message, $code){
|
function returnError($message, $code){
|
||||||
throw new \HttpException($message, $code);
|
throw new \HttpException($message, $code);
|
||||||
}
|
}
|
||||||
|
|
||||||
function returnClientError($message){
|
function returnClientError($message){
|
||||||
returnError($message, 400);
|
returnError($message, 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
function returnServerError($message){
|
function returnServerError($message){
|
||||||
returnError($message, 500);
|
returnError($message, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
function debugMessage($text){
|
function debugMessage($text){
|
||||||
if(!file_exists('DEBUG')) {
|
if(!file_exists('DEBUG')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3);
|
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3);
|
||||||
$calling = $backtrace[2];
|
$calling = $backtrace[2];
|
||||||
$message = $calling['file'] . ':'
|
$message = $calling['file'] . ':'
|
||||||
. $calling['line'] . ' class '
|
. $calling['line'] . ' class '
|
||||||
. $calling['class'] . '->'
|
. $calling['class'] . '->'
|
||||||
. $calling['function'] . ' - '
|
. $calling['function'] . ' - '
|
||||||
. $text;
|
. $text;
|
||||||
|
|
||||||
error_log($message);
|
error_log($message);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
@@ -53,7 +53,6 @@ function validateData(&$data,$parameters){
|
|||||||
return $filteredValue;
|
return $filteredValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if(!is_array($data))
|
if(!is_array($data))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -99,5 +98,3 @@ function validateData(&$data,$parameters){
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
Reference in New Issue
Block a user