Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

+16 -10
View File
@@ -1,23 +1,29 @@
//<?php
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
exit;
}
class cms_hook_Output extends _HOOK_CLASS_
{
/**
* Display Error Screen
*
* @param string $message language key for error message
* @param mixed $code Error code
* @param int $httpStatusCode HTTP Status Code
* @param string $adminMessage language key for error message to show to admins
* @param array $httpHeaders Additional HTTP Headers
* @param string $extra Additional information (such as API error)
* @return void
* @param string $message language key for error message
* @param mixed $code Error code
* @param int $httpStatusCode HTTP Status Code
* @param string $adminMessage language key for error message to show to admins
* @param array $httpHeaders Additional HTTP Headers
* @param string $extra Additional information (such backtrace or API error) which will be shown to admins
* @param int|string|NULL $faultyAppOrHookId The 3rd party application or the hook id, which caused this error, NULL if it was a core application
*/
public function error( $message, $code, $httpStatusCode=500, $adminMessage=NULL, $httpHeaders=array(), $extra=NULL )
public function error( $message, $code, $httpStatusCode=500, $adminMessage=NULL, $httpHeaders=array(), $extra=NULL, $faultyAppOrHookId=NULL )
{
if ( ! isset( \IPS\Settings::i()->cms_error_page ) or ! \IPS\Settings::i()->cms_error_page )
{
parent::error( $message, $code, $httpStatusCode, $adminMessage, $httpHeaders, $extra );
parent::error( $message, $code, $httpStatusCode, $adminMessage, $httpHeaders, $extra, $faultyAppOrHookId );
}
/* If we just logged out, we don't want to show a "no permission" error */
@@ -75,7 +81,7 @@ class cms_hook_Output extends _HOOK_CLASS_
if( \IPS\Settings::i()->error_notify_level and $level >= \IPS\Settings::i()->error_notify_level )
{
\IPS\Email::buildFromTemplate( 'core', 'error_log', array( $code, $message ) )->send( \IPS\Settings::i()->email_in );
\IPS\Email::buildFromTemplate( 'core', 'error_log', array( $code, $message ), \IPS\Email::TYPE_LIST )->send( \IPS\Settings::i()->email_in );
}
}