Permalink
Browse files

fixed missing const argument, when passed magic_file argument fails.

  • Loading branch information...
sasezaki committed Mar 24, 2013
1 parent 5045219 commit c1a406a5fe1289cde7d7134760e9c9af8da51fcf
@@ -1232,7 +1232,7 @@ protected function detectMimeType($value)
if (empty($mime)) {
ErrorHandler::start();
- $mime = finfo_open($const);
+ $mime = finfo_open(FILEINFO_MIME_TYPE);
ErrorHandler::stop();
}
@@ -66,7 +66,7 @@ public function isValid($value, $file = null)
}
if (empty($this->finfo)) {
- $this->finfo = finfo_open($const);
+ $this->finfo = finfo_open(FILEINFO_MIME_TYPE);
}
$this->type = null;
@@ -383,7 +383,7 @@ public function isValid($value, $file = null)
if (empty($this->finfo)) {
ErrorHandler::start(E_NOTICE|E_WARNING);
- $this->finfo = finfo_open($const);
+ $this->finfo = finfo_open(FILEINFO_MIME_TYPE);
ErrorHandler::stop();
}

0 comments on commit c1a406a

Please sign in to comment.