At 03:00 08/10/2003, Ilia Alshanetsky wrote:
On October 7, 2003 08:45 pm, Jan Schneider wrote:
> I never said that the current behaviour is in any way consistent. But which
> behaviour the more logical one is, is debateable. Many languages support
> context dependant implicit casting, and PHP even says so explicitely in the
> manual. Why should this now be incorrect, not logical or not "proper"?

Incosistent behaviour is a problem, whether it is a serious problem or a
trivial one depends on a situation, however it does not change the fact it is
a problem. IMO when a function expects an array it should error out when the
argument it recieves is not array, with a possible exception of object's who
in ZE1 are nearly identical to arrays. Further more there is already an
fairly large number of functions of a similar function that operate in a
similar manner. It only makes sense to fix the one or two that do not.

Ilia,


The fact of the matter is that other than your opinion (which several people may support), there was and still isn't nothing problematic with silently ignoring NULL arrays. A thing that's known to break pieces of code, must not be 'fixed' in a bug fix release - this is completely and entirely obvious IMHO, and was a rule we always tried to go by in the past. I agree with others here that whether it should be changed altogether is debatable, considering the nature of PHP, and the fact that it has no problems whatsoever to treat NULL values as empty arrays, by design. It should be debated in the context of a feature-release though, not a bug-fix release.

As a rule of the thumb - if you bump into something that broke compatibility and you found it even before releasing, it means it affects TONS of users. If it was an important security issue, then it might have been worth it. If it's a small nuance about code purity, it isn't worth it...

Zeev

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to