Re: Re: [Patches]#36944, #54556, #55211(and svn karma applying)
2011/7/26 Gustavo Lopes <[email protected]>:
> Em Tue, 26 Jul 2011 06:42:50 +0100, Laruence <[email protected]> escreveu:
>
>> 2011/7/25 Laruence <[email protected]>:
>>>
>>> Hi:
>>> recently I was working on PHP bugs.
>>>
>>> and submit 3 patches,
>>>
>>> #36944 strncmp & negative len
>>> https://bugs.php.net/bug.php?id=36944
>
> Looks good, but I didn't got through it thoroughly to check the consistency
> of the signs.
>
>>> #54556 array access to empty var does not trigger a notice
>>> https://bugs.php.net/bug.php?id=54556
>
> Won't this be affected?
>
> <?php
> $foo[] = 'bar';
>
no, this situation won't be affected
> I don't see a good reason for this not to be allowed.
>
>>> #55211 ArrayObject::getArrayObject () should skip proteced or
>>> private properties https://bugs.php.net/bug.php?id=55211
>
> Looks good.
>
>>
>> #55128 SplFixedArray::fromArray() does not use extended class
>
> This doesn't look like a good idea. The constructor is not called (and in
> general can't be, since we can't know how the subclass constructor looks
> like), so the new object can be in an illegal state.
>
After much thought, I think there maybe no reason for fixedarray
extended class to define it's own constructor, since we provide
fixedarrary::__construct and fromArray already, and extended class
should only get an instance through calling them.
so I think we can make fixedarray::__construct final to make this feature works.
> --
> Gustavo Lopes
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
thanks
--
Laruence Xinchen Hui
http://www.laruence.com/
Thread (5 messages)