Skip to content
Browse files

When raiseError() is passed an object, examine if message should be s…

…kipped or not.
  • Loading branch information...
1 parent 24e82c6 commit 6cbc32b6cf79094fb267621ed2090567eca41bd4 @convissor convissor committed Dec 23, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 PEAR.php
View
6 PEAR.php
@@ -487,6 +487,12 @@ function &raiseError($message = null,
$error_class = $message->getType();
$message->error_message_prefix = '';
$message = $message->getMessage();
+
+ // Make sure right data gets passed.
+ $r = new ReflectionClass($error_class);
+ $c = $r->getConstructor();
+ $p = array_shift($c->getParameters());
+ $skipmsg = ($p->getName() != 'message');
}
if (

0 comments on commit 6cbc32b

Please sign in to comment.
Something went wrong with that request. Please try again.