File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 4545 *
4646 * @copyright Jorge Castro C. MIT License https://github.com/EFTEC/AutoLoadOne
4747 *
48- * @version 1.25 2021-04-17
48+ * @version 1.25.1 2021-06-09
4949 * @noautoload
5050 */
5151class AutoLoadOne
5252{
53- const VERSION = '1.25 ' ;
53+ const VERSION = '1.25.1 ' ;
5454
5555
5656 public $ rooturl = '' ;
@@ -1089,8 +1089,10 @@ function autoloadone_exception_handler($exception) {
10891089 $r .= "Trace:\n";
10901090 foreach ($exception->getTrace() as $error) {
10911091 // we remove all trace pointing to this file.
1092- if (strpos($error['file'], __FILE__) === false) {
1093- $r .= $error['file'] . '[' . $error['line'] . ']' . ' function:' . @$error['function'] . '(' . @implode(',', @$error['args']) . ')' . "\n";
1092+ if (isset($error['file']) && strpos($error['file'], __FILE__) === false) {
1093+ $r .= $error['file'] . '[' . $error['line'] . ']' . ' function:' . @$error['function'] . '('
1094+ .( is_array(@$error['args']) ? @implode(',', @$error['args']) . ')' : @$error['args'])
1095+ . "\n";
10941096 }
10951097 }
10961098 }
@@ -1102,6 +1104,7 @@ function autoloadone_exception_handler($exception) {
11021104}
11031105
11041106
1107+
11051108spl_autoload_register(static function ($class_name) {
11061109 {{tempname}}__auto($class_name);
11071110});
Original file line number Diff line number Diff line change @@ -571,6 +571,8 @@ reads the composer.json files once.
571571
572572## Version
573573
574+ * 1.25.1 2021-06-09
575+ * [ fix] in autoloadone_exception_handler when the arguments of the error is not an array but a string.
574576* 1.25 2021-04-17
575577 * A better error management. Now, it shows the line of the error in a custom trace.
576578* 1.24 2021-04-17
You can’t perform that action at this time.
0 commit comments