Adding val_blob(..) checker
This commit is contained in:
parent
55f8b0dea9
commit
97507efb23
|
@ -182,3 +182,13 @@ function val_enum($enum, $val, $check_enum_validity = true)
|
|||
return $val;
|
||||
}
|
||||
|
||||
function val_blob($val)
|
||||
{
|
||||
if(is_null($val))
|
||||
return $val;
|
||||
|
||||
if(!is_string($val))
|
||||
throw new Exception("Bad item, not a blob string(" . serialize($val) . ")");
|
||||
|
||||
return $val;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue