Re: [PHP-DEV] [RFC] get_class() disallow null parameter

2016-08-15 Thread Marco Pivetta
Works for me 👍 On 15 Aug 2016 10:17 p.m., "Dan Ackroyd" wrote: > On 14 August 2016 at 19:01, Marco Pivetta wrote: > > Hi Dan, > > > > This is a SemVer violation, but it doesn't seem like PHP follows SemVer > > closely, so I'm a bit confused about whether this can target 7.x. > > It was broken i

Re: [PHP-DEV] [RFC] get_class() disallow null parameter

2016-08-15 Thread Dan Ackroyd
On 14 August 2016 at 19:01, Marco Pivetta wrote: > Hi Dan, > > This is a SemVer violation, but it doesn't seem like PHP follows SemVer > closely, so I'm a bit confused about whether this can target 7.x. It was broken in a minor release, it can be fixed in a minor release imo. cheers Dan -- PHP

Re: [PHP-DEV] [RFC] get_class() disallow null parameter

2016-08-14 Thread Dan Ackroyd
On 14 August 2016 at 22:48, Stanislav Malyshev wrote: > > Could you please clarify what you mean by "disallow"? It will be the standard behaviour for accepting params. The patch is just: - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|o!", &obj) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_

Re: [PHP-DEV] [RFC] get_class() disallow null parameter

2016-08-14 Thread Stanislav Malyshev
Hi! > Following an earlier discussion in January, here is a small RFC to > change get_class() to disallow null being passed as parameter. > > https://wiki.php.net/rfc/get_class_disallow_null_parameter Could you please clarify what you mean by "disallow"? I've read the RFC but I didn't find descr

Re: [PHP-DEV] [RFC] get_class() disallow null parameter

2016-08-14 Thread Marco Pivetta
Hi Dan, On Sun, Aug 14, 2016 at 1:00 PM, Dan Ackroyd wrote: > Hi! > > Following an earlier discussion in January, here is a small RFC to > change get_class() to disallow null being passed as parameter. > > https://wiki.php.net/rfc/get_class_disallow_null_parameter > > Allowing null to be passed

[PHP-DEV] [RFC] get_class() disallow null parameter

2016-08-14 Thread Dan Ackroyd
Hi! Following an earlier discussion in January, here is a small RFC to change get_class() to disallow null being passed as parameter. https://wiki.php.net/rfc/get_class_disallow_null_parameter Allowing null to be passed to get_class() is a 'gotcha' that is almost always a mistake in someone's co