For Programmers: Free Programming Magazines  


Home > Archive > PHP PEAR Questions and Answers > April 2004 > Re: [PEAR-QA] BC-break in Mail/mail.php? (was: Mail-1.1.3 (stable) Released.)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR-QA] BC-break in Mail/mail.php? (was: Mail-1.1.3 (stable) Released.)
Jon Parise

2004-04-08, 5:32 pm

On Thu, Apr 08, 2004 at 09:38:15PM +0200, Stefan Neufeind wrote:

> the difference is in Mail/mail.php, in the function "send". It was
> always documented that a PEAR_Error is returned. But does someone
> have experience if it really returned a PEAR_Error up to now? To me
> it seems that in 1.1.2 false was returned - and in 1.1.3 now there is
> a check against === false which then results in a real PEAR_Error
> been thrown.
> Is this a BC-break, though it was always documented differently? Hard
> to decide, I know. But please comment!


It's not really a backwards compatibility break. It still returns
'true' on success, as documented. Now, the error value also matches
the documentation.

--
Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)
Stefan Neufeind

2004-04-09, 7:30 am

On 9 Apr 2004 at 11:46, Lukas Smith wrote:

> Stefan Neufeind wrote:
>
> imho code is law .. therefore what you describe sounds like a BC break
> to me.


Well, as already outlined in the thread: It still returns true upon
success. And for all other drivers as well as even in the
documentation of Mail/mail.php it was documented that send() returns
true or a PEAR_Error. However, it didn't do that up to v1.1.3. So it
might be considered a badly needed fix. However, maybe some people
always "coded around" this bug? That's why I said it's not simply a
BC-break :-((

Stefan
Stefan Neufeind

2004-04-09, 7:30 am

On 9 Apr 2004 at 12:15, Lukas Smith wrote:

> Stefan Neufeind wrote:
>
>
> but the method doesnt return false anymore on error


So what do you propose to do? And how should it have been done
differently? I mean, you can't branch a new major release for this,
though this would be the only way to handle a BC-break for a stable-
version. Very bad situation :-((

Stefan
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com