diff --git a/php/Access/Access.php b/php/Access/Access.php index 43b8bab..e991915 100644 --- a/php/Access/Access.php +++ b/php/Access/Access.php @@ -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.'); } } -?> \ No newline at end of file +?> diff --git a/php/Access/Admin.php b/php/Access/Admin.php index df622f6..94edd0a 100644 --- a/php/Access/Admin.php +++ b/php/Access/Admin.php @@ -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 { } -?> \ No newline at end of file +?> diff --git a/php/Access/Guest.php b/php/Access/Guest.php index 7b988a2..6cc650c 100644 --- a/php/Access/Guest.php +++ b/php/Access/Guest.php @@ -36,7 +36,7 @@ final class Guest extends Access { } - self::fnNotFound(); + self::fnNotFound($fn); } @@ -184,4 +184,4 @@ final class Guest extends Access { } -?> \ No newline at end of file +?>