Skip to content

Commit 9db0ee9

Browse files
committed
enable strict checking for in_array
1 parent 6e7a790 commit 9db0ee9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
All notable changes to the Laravel Mail Viewer be documented in this file
22

3+
## v3.1.0 (05-12-2018)
4+
- Fixed the behaviour of in_array by enabling strict checking.
5+
36
## v3.0.0 (13-11-2018)
47
- If the constructor dependency is not type hinted it will trust the user input in the config file as a replacement. [PR for this feature](https://github.com/JoggApp/laravel-mail-viewer/pull/15)
58
- Big thanks & credits to [Junhai](https://github.com/starvsion) for making this possible :)

src/MailViewer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static function find(string $mail)
4848
$factoryStates = [];
4949

5050
if (is_array($dependency)) {
51-
if (in_array('states', array_keys($dependency))) {
51+
if (in_array('states', array_keys($dependency), true)) {
5252
$factoryStates = $dependency['states'];
5353
$dependency = $dependency['class'];
5454
}
@@ -85,7 +85,7 @@ public static function prepareMails(array $mailables): array
8585

8686
foreach ($dependencies as $dependency) {
8787
if (is_array($dependency)) {
88-
if (in_array('states', array_keys($dependency))) {
88+
if (in_array('states', array_keys($dependency), true)) {
8989
$dependency = $dependency['class'];
9090
}
9191
}

0 commit comments

Comments
 (0)