-
Notifications
You must be signed in to change notification settings - Fork 11
Update README.md #14
base: master
Are you sure you want to change the base?
Update README.md #14
Conversation
Argument 3 passed to Hoa\Exception\Exception::__construct() must be of the type array
Hello :-), If it is not an array, it is automatically casted to an array (for strange backward compatibilities), check Lines 132 to 134 in c8dc4f4
I wonder if we want the user to always pass an array, cc @vonglasow? |
@Hywan Sorry I might have missed your comment! yes, that is true for That is mine /**
* Each exception must extend `Hoa\Exception\Exception`.
*/
class Exception extends Idle implements Event\Source
{
/**
* Allocates a new exception.
*
* An exception is built with a formatted message, a code (an ID), and an
* array that contains the list of formatted string for the message. If
* chaining, a previous exception can be added.
*/
public function __construct(
string $message,
int $code = 0,
array $arguments = [],
\Throwable $previous = null
) { notice the but apparently you have already fallen into the same issue I have now with Exception/Source/Exception.php Lines 56 to 61 in c8dc4f4
Thankfully I noticed your reply because I was about to make a PR in Nice work by the way! I'm using both |
Just in case anyone falls into the same issue as I did, check your also after your modifications in |
You're right, this is a bug in the |
Argument 3 passed to Hoa\Exception\Exception::__construct() must be of the type array