Skip to content
Snippets Groups Projects

dev#128218 : findall_check_array : add exception when findallby on empty array...

Merged Laurent requested to merge findall_check_array into master
Compare and
2 files
+ 24
9
Preferences
Compare changes
Files
2
@@ -225,6 +225,10 @@ class Storm_Model_PersistenceStrategy_Volatile extends Storm_Model_PersistenceS
if (!array_key_exists($key, $model))
return false;
if (is_array($value) && count($value) == 0)
throw new Storm_Model_Exception(sprintf('array given for %s is empty',
$key));
if (is_array($value) && in_array($model[$key], $value))
return true;