File tree Expand file tree Collapse file tree 5 files changed +12
-2
lines changed
Expand file tree Collapse file tree 5 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 11parameters :
2- level : 7
2+ level : 8
33 paths :
44 - resources
55 - webroot
@@ -19,6 +19,8 @@ parameters:
1919 - ' #array\|bool supplied for foreach , only iterables are supported #'
2020 - ' #Cannot access offset \S+ on \S+\|bool #'
2121 - ' #ldap_get_entries expects LDAP\\Result , array\|LDAP\\Result given #'
22+ - ' #array_key_exists expects array , array\|null given #'
23+ - ' #array\|null supplied for foreach , only iterables are supported #'
2224 paths :
2325 - resources/lib/phpopenldaper
2426 - messages :
Original file line number Diff line number Diff line change @@ -243,7 +243,9 @@ public static function getPostData(string $key): string
243243 return $ _POST [$ key ];
244244 }
245245
246- /* returns null if not found and not $die_if_not_found */
246+ /**
247+ * @return ($die_if_not_found is true ? string : string|null)
248+ */
247249 public static function getQueryParameter (string $ key , bool $ die_if_not_found = true ): ?string
248250 {
249251 if (!array_key_exists ($ key , $ _GET )) {
Original file line number Diff line number Diff line change 22
33namespace UnityWebPortal \lib ;
44
5+ use RuntimeException ;
56use UnityWebPortal \lib \exceptions \EntryNotFoundException ;
67use PHPOpenLDAPer \LDAPConn ;
78use PHPOpenLDAPer \LDAPEntry ;
@@ -147,6 +148,9 @@ private function getCustomIDMappings(): array
147148 }
148149 $ output_map = [];
149150 foreach ($ output as [$ uid , $ uidNumber_str ]) {
151+ if ($ uidNumber_str === null ) {
152+ throw new RuntimeException ("uidNumber_str is null " );
153+ }
150154 $ output_map [$ uid ] = digits2int ($ uidNumber_str );
151155 }
152156 return $ output_map ;
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ public function testRemoveUser($methodName)
5858 break ;
5959 }
6060 }
61+ assert ($ memberToDelete !== null );
6162 $ this ->assertNotEquals ($ pi ->uid , $ memberToDelete ->uid );
6263 $ this ->assertTrue ($ memberToDelete ->getFlag (UserFlag::QUALIFIED ));
6364 $ this ->assertTrue ($ piGroup ->memberUIDExists ($ memberToDelete ->uid ));
Original file line number Diff line number Diff line change @@ -558,6 +558,7 @@ function switchUser(
558558
559559 function switchBackUser (bool $ validate = false )
560560 {
561+ assert ($ this ->last_user_nickname !== null );
561562 $ this ->switchUser ($ this ->last_user_nickname , validate: $ validate );
562563 }
563564
You can’t perform that action at this time.
0 commit comments