Skip to content

Commit

Permalink
Bring prepend() in line with register()
Browse files Browse the repository at this point in the history
  • Loading branch information
CHH committed May 2, 2013
1 parent 63f9dcd commit 36e0de1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Pipe/Util/ProcessorRegistry.php
Expand Up @@ -9,8 +9,8 @@ class ProcessorRegistry

function prepend($mimeType, $processor)
{
if (!class_exists($processor)) {
throw new \InvalidArgumentException("Class $processor is not defined");
if (!class_exists($processor) and !is_callable($processor)) {
throw new \InvalidArgumentException("Processor must be either a factory callback or a class name");
}

if (empty($this->processors[$mimeType])) {
Expand Down

0 comments on commit 36e0de1

Please sign in to comment.