Skip to content

Commit a76cb7a

Browse files
committed
Added exception variable to try catches
1 parent 8b1329c commit a76cb7a

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"array", "array helper", "array utils", "array merge", "library", "helper", "support"
66
],
77
"type": "library",
8-
"version": "1.0.1",
98
"homepage": "https://github.com/nabeghe/arrayer-php",
109
"license": "MIT",
1110
"autoload": {

src/Traits/LaravelArrTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ public static function map(array $array, callable $callback)
605605

606606
try {
607607
$items = array_map($callback, $array, $keys);
608-
} catch (\ArgumentCountError) {
608+
} catch (\ArgumentCountError $e) {
609609
$items = array_map($callback, $array);
610610
}
611611

src/Traits/NabegheArrTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static function cast($value): array
3939
} else {
4040
try {
4141
$value = (array) $value;
42-
} catch (\Throwable $throwable) {
42+
} catch (\Throwable $e) {
4343
}
4444
}
4545
if (!is_array($value)) {

0 commit comments

Comments
 (0)