Skip to content

Commit 209d53a

Browse files
committed
1.25.1 see README.md
1 parent 0b8783e commit 209d53a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

AutoLoadOne.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@
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
*/
5151
class 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+
11051108
spl_autoload_register(static function ($class_name) {
11061109
{{tempname}}__auto($class_name);
11071110
});

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)