]> jfr.im git - irc/unrealircd/unrealircd-rpc-php.git/commitdiff
Actually fix some return errors mentioned in previous commit
authorValerie Pond <redacted>
Tue, 10 Jan 2023 05:14:00 +0000 (05:14 +0000)
committerValerie Pond <redacted>
Tue, 10 Jan 2023 05:14:00 +0000 (05:14 +0000)
lib/NameBan.php
lib/ServerBan.php
lib/Spamfilter.php
lib/User.php

index 0447d89ecd37c1dd038bea721597cbeabf889199..fd7f7cb9df720d5bc78afae4d7df17cf78e6f01d 100644 (file)
@@ -40,7 +40,7 @@ class NameBan
 
         if (is_bool($response))
             return false;
-            
+
         if (property_exists($response, 'tkl'))
             return $response->tkl;
         return FALSE;
@@ -101,6 +101,6 @@ class NameBan
             return $response->tkl;
         }
 
-        throw new Exception('Invalid JSON Response from UnrealIRCd RPC.');
+        return false; // not found
     }
 }
index 9f874b871fd4e307490afb0a080c5420968d3891..0183ee367b27ec8daa662059ad2faf8bf3d1fb29 100644 (file)
@@ -33,7 +33,7 @@ class ServerBan
 
         if (is_bool($response))
             return false;
-            
+
         if (property_exists($response, 'tkl'))
             return $response->tkl;
         return FALSE;
@@ -95,6 +95,6 @@ class ServerBan
             return $response->tkl;
         }
 
-        throw new Exception('Invalid JSON Response from UnrealIRCd RPC.');
+        return false; // didn't exist
     }
 }
index 723c3708bd336fa8ca4fcba10304eee728575b05..103f455804fbcfc69f7947bce6d97dec9d24a566 100644 (file)
@@ -57,7 +57,7 @@ class Spamfilter
 
         if (is_bool($response))
             return false;
-            
+
         if (property_exists($response, 'tkl'))
             return $response->tkl;
         return FALSE;
@@ -99,6 +99,6 @@ class Spamfilter
             return $response->tkl;
         }
 
-        throw new Exception('Invalid JSON Response from UnrealIRCd RPC.');
+        return false; // not found
     }
 }
index 90deaeded05df90985f73a8d3ff078de6c925480..484dbef4657267d75aad55240e7820b39133c423 100644 (file)
@@ -45,7 +45,7 @@ class User
             return $response->client;
         }
 
-        throw new Exception('Invalid JSON Response from UnrealIRCd RPC.');
+        return false; // not found
     }
 
     /**