diff options
Diffstat (limited to 'engine/lib/objects.php')
-rw-r--r-- | engine/lib/objects.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engine/lib/objects.php b/engine/lib/objects.php index 29f29955a..8d78bddd8 100644 --- a/engine/lib/objects.php +++ b/engine/lib/objects.php @@ -70,9 +70,12 @@ throw new InvalidParameterException("Passing a non-ElggObject to an ElggObject constructor!");
// We assume if we have got this far, $guid is an int
- else if (is_int($guid)) {
+ else if (is_numeric($guid)) {
if (!$this->load($guid)) throw new IOException("Could not create a new ElggObject object from GUID:$guid");
- }
+ } + + else + throw new IOException("Unrecognised value passed to constuctor.");
}
}
|