Correct check for File subclass

This commit is contained in:
Simon Welsh 2013-02-18 17:35:17 +13:00
parent 9ecea763c3
commit b81386a431

View File

@ -936,7 +936,7 @@ class File extends DataObject {
if(!is_array($exts)) $exts = array($exts);
foreach($exts as $ext) {
if(is_subclass_of($ext, 'File')) {
if(!is_subclass_of($ext, 'File')) {
throw new InvalidArgumentException(
sprintf('Class "%s" (for extension "%s") is not a valid subclass of File', $class, $ext)
);