Re: pecl/gender bug in PHP V5.3
| From: | Richard Quadling | Date: | Mon, 13 May 2013 09:47:31 +0000 |
| Subject: | Re: pecl/gender bug in PHP V5.3 | ||
| References: | 1 2 3 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-10621@lists.php.net to get a copy of this message | ||
On 10 May 2013 23:06, Richard Quadling <rquadling@gmail.com> wrote:
> pecl's bug reporter doesn't have gender in the list of extensions.
>
> Other than that, I'll report this on Monday when I'm back in the office
> with the correct environment.
>
> Thank you.
>
>
> On 10 May 2013 19:36, Anatol Belski <ab@php.net> wrote:
>
>> Richard,
>>
>> please try on trunk with 5.3 and 5.4, I've just pushed a fix. Also
>> please file a bug for this issue.
>>
>> Regards
>>
>> Anatol
>>
>>
>> On Fri, 2013-05-10 at 14:28 +0100, Richard Quadling wrote:
>> > Hello all.
>> >
>> >
>> > Very odd behaviour.
>> >
>> >
>> > <?php
>> > if (extension_loaded('gender')) {
>> > $o_Gender = new Gender\Gender;
>> >
>> >
>> > var_dump($o_Gender);
>> > }
>> >
>> >
>> > class Variable {
>> >
>> >
>> > public $value = null;
>> > }
>> >
>> >
>> > $a = new Variable;
>> > $b = clone $a;
>> >
>> >
>> > var_dump($a, $b);
>> > ?>
>> >
>> >
>> > If using pecl/Gender V0.9.0 with PHP V5.3.3, V5.3.13, V5.3.23, then I
>> > get an error ...
>> >
>> >
>> > PHP Fatal error: Trying to clone an uncloneable object of class
>> > Variable in - on line 14
>> >
>> >
>> >
>> > No problem with V5.4.14
>> >
>> >
>> > No idea why this is the case. Changelog for V5.3 doesn't reveal
>> > anything regarding cloning.
>> >
>> >
>> > I'm running this on a CentOS vm (not my speciality, so I can't
>> > diagnose any further, sorry).
>> >
>> >
>> > If anyone can shed some light on this, then that would be useful.
>> >
>> >
>> > Regards,
>> >
>> >
>> > Richard.
>> >
>> >
>> > --
>> > Richard Quadling
>> > Twitter : @RQuadling
>>
>
This seems to be working just fine for V5.4.
Test 009.phpt ...
--TEST--
Test __clone() breakage
--SKIPIF--
<?php if (!extension_loadad('gender')) print 'skip'; ?>
--FILE--
<?php
$g = new Gender\Gender;
class Dummy {
public $value = null;
}
$a = new Dummy;
$b = clone $a;
var_dump($g, $a, $b);
?>
DONE
--EXPECT--
object(Gender\Gender)#1 (0) {
}
object(Dummy)#2 (1) {
["value"]=>
NULL
}
object(Dummy)#3 (1) {
["value"]=>
NULL
}
DONE
Can a new point release be made with this?
Regards,
Richard.
--
Richard Quadling
Twitter : @RQuadling
EE : http://e-e.com/M_248814.html
Zend : http://bit.ly/9O8vFY