File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ parameters:
6
6
7
7
# Should not need to edit anything below here
8
8
# Rule Level: https://phpstan.org/user-guide/rule-levels
9
- level: 9
9
+ level: 10
Original file line number Diff line number Diff line change @@ -867,10 +867,22 @@ public function get_subscriber_id(string $email_address)
867
867
return false ;
868
868
}
869
869
870
+ if (!is_array ($ subscribers ->subscribers )) {
871
+ return false ;
872
+ }
873
+
870
874
if (!count ($ subscribers ->subscribers )) {
871
875
return false ;
872
876
}
873
877
878
+ if (!$ subscribers ->subscribers [0 ] instanceof \stdClass) {
879
+ return false ;
880
+ }
881
+
882
+ if (!is_int ($ subscribers ->subscribers [0 ]->id )) {
883
+ return false ;
884
+ }
885
+
874
886
// Return the subscriber's ID.
875
887
return $ subscribers ->subscribers [0 ]->id ;
876
888
}
You can’t perform that action at this time.
0 commit comments