]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Managed_DataObject.php
Added type-hint for adaptNoticeListItem() method
[quix0rs-gnu-social.git] / classes / Managed_DataObject.php
index 5f8445d81e641b7f595a415f185100c48bbb4580..7492d9097814dfa6daf3fc12ef96cd1200cc881a 100644 (file)
@@ -371,7 +371,7 @@ abstract class Managed_DataObject extends Memcached_DataObject
             if (!array_key_exists($col, $vals)) {
                 continue;
             } elseif (is_null($vals[$col])) {
-                throw new ServerException("NULL values not allowed in getByPK for column '{$col}'");
+                throw new ServerException("NULL values not allowed in getByKeys for column '{$col}'");
             }
             $object->$col = $vals[$col];
         }
@@ -384,7 +384,7 @@ abstract class Managed_DataObject extends Memcached_DataObject
     static function getByID($id)
     {
         if (empty($id)) {
-            throw new ServerException('Empty ID on lookup');
+            throw new EmptyIdException(get_called_class());
         }
         // getByPK throws exception if id is null
         // or if the class does not have a single 'id' column as primary key