diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/helpers/item.php | 2 | ||||
-rw-r--r-- | modules/gallery/tests/Item_Helper_Test.php | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php index 3596a2bf..08a04ad0 100644 --- a/modules/gallery/helpers/item.php +++ b/modules/gallery/helpers/item.php @@ -232,7 +232,7 @@ class item_Core { } } - return false; + return new Item_Model(); } diff --git a/modules/gallery/tests/Item_Helper_Test.php b/modules/gallery/tests/Item_Helper_Test.php index 4124e453..0aa7504e 100644 --- a/modules/gallery/tests/Item_Helper_Test.php +++ b/modules/gallery/tests/Item_Helper_Test.php @@ -166,8 +166,7 @@ class Item_Helper_Test extends Gallery_Unit_Test_Case { item::find_by_path("{$level1->name}/{$level2b->name}/{$level3b->name}")->id); // Verify that we don't get false positives - $this->assert_same( - false, - item::find_by_path("foo/bar/baz")); + $this->assert_false( + item::find_by_path("foo/bar/baz")->loaded()); } } |