change not found handler to log function

pull/781/head
oxpa 6 years ago
parent 727c74c294
commit 280d221378

@ -2,16 +2,18 @@
namespace Lychee\Access;
use Exception;
use Lychee\Modules\Response;
abstract class Access {
final protected static function fnNotFound() {
final protected static function fnNotFound($fn) {
$e = new Exception;
error_log("$fn: Function not found!" . var_export($e->getTraceAsString(), true));
Response::error('Function not found! Please check the spelling of the called function.');
}
}
?>
?>

@ -63,9 +63,9 @@ final class Admin extends Access {
case 'Album::getArchive': self::getAlbumArchiveAction(); break;
case 'Photo::getArchive': self::getPhotoArchiveAction(); break;
default: self::fnNotFound($fn);
}
self::fnNotFound();
//self::fnNotFound($fn);
}
@ -352,4 +352,4 @@ final class Admin extends Access {
}
?>
?>

@ -36,7 +36,7 @@ final class Guest extends Access {
}
self::fnNotFound();
self::fnNotFound($fn);
}
@ -184,4 +184,4 @@ final class Guest extends Access {
}
?>
?>

Loading…
Cancel
Save