mirror of
https://github.com/gtbu/Typesetter-5.3-p8.git
synced 2024-11-24 15:19:12 +01:00
common.php
This commit is contained in:
parent
ea2879ec43
commit
cfac4937b1
1 changed files with 7 additions and 6 deletions
|
@ -157,7 +157,8 @@ if ( function_exists('date_default_timezone_set') ){
|
|||
* @return false Always returns false so the standard PHP error handler is also used
|
||||
*
|
||||
*/
|
||||
function showError($errno, $errmsg, $filename, $linenum, $vars, $backtrace=null){
|
||||
function showError($errno, $errmsg, $filename, $linenum, $vars=null, $backtrace=null): bool
|
||||
{
|
||||
global $wbErrorBuffer, $addon_current_id, $page, $addon_current_version, $config, $addonFolderName;
|
||||
static $reported = [];
|
||||
|
||||
|
@ -187,7 +188,7 @@ function showError($errno, $errmsg, $filename, $linenum, $vars, $backtrace=null)
|
|||
|
||||
// since we supported older versions of php, there may be a lot of strict errors
|
||||
if( $errno === E_STRICT ){
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
//get the backtrace and function where the error was thrown
|
||||
|
@ -226,7 +227,7 @@ function showError($errno, $errmsg, $filename, $linenum, $vars, $backtrace=null)
|
|||
}
|
||||
|
||||
//if it's a core error, it should be in the include folder
|
||||
}elseif( strpos($filename, '/include/') === false ){
|
||||
}elseif(!str_contains($filename, '/include/')){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -412,7 +413,7 @@ function msg(){
|
|||
|
||||
|
||||
/**
|
||||
* add message only if admin user is logged in
|
||||
* add message only if admin user is logged in
|
||||
* @since 5.2
|
||||
*
|
||||
*/
|
||||
|
@ -575,7 +576,7 @@ function IncludeScript($file, $include_variation = 'include_once', $globals=arra
|
|||
//check to see if it exists
|
||||
$include_variation = str_replace('_if', '', $include_variation, $has_if);
|
||||
if( $has_if && !$exists ){
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
//check for fatal errors
|
||||
|
@ -680,7 +681,7 @@ function pre($mixed){
|
|||
* @deprecated 2.6
|
||||
*/
|
||||
function showArray($mixed){
|
||||
trigger_error('Deprecated function showArray(). Use pre() instead');
|
||||
trigger_error('Deprecated function showArray(). Use pre() instead');
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue