Re: Re: PEAR_Error::userinfo is meant to be only a string?
| From: | David Sanders | Date: | Mon, 19 Feb 2007 06:15:41 +0000 |
| Subject: | Re: Re: PEAR_Error::userinfo is meant to be only a string? | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-45674@lists.php.net to get a copy of this message | ||
Hey Justin,
I understand that parameter 5 is for userinfo, the reason why I pointed you towards the url is because it says that its a string ;)
Gregory Beaver wrote:
Justin Patrin wrote:-- David SandersI had previously thought that userinfo in PEAR_Error objects was allowed to be any type of variable to allow for arbitrary debug information to be thrown with the error object but bug #10121 has pointed out to me that userinfo is used in PEAR_Error::toString() in sprintf() directly, causing an error. Is the correct usage for userinfo only a string?There is no "correct usage" but if you use PEAR_ERROR_PRINT mode it will attempt to print userinfo as if it were a string. Basically, the answer is "don't worry about it, do whatever you want, PEAR_Error is obsolete anyways" :) Greg