Rasmus Lerdorf in php.internals (Fri, 21 Jul 2017 22:15:13 -0400):
>On Fri, Jul 21, 2017 at 9:50 PM, Jan Ehrhardt <php...@ehrhardt.nl> wrote:
>
>> The case: class RulesActionContainerUI has a public function form:
>> > public function form(&$form, &$form_state, $options = array(), $iterator
>> = NULL) {
>>
>> class RulesRuleUI extends RulesActionContainerUI with a public function
>> > public function form(&$form, &$form_state, $options = array()) {
>>
>> Bad programming, but no PHP ever stumbled over it. PHP 7.2.0 Beta 1
>> issues a fatal error that RulesRuleUI::form must be compatible with
>> RulesActionContainerUI::form. IMHO a valid remark, but still a BC break.
>> Is this documented anywhere? Or should the Fatal Error become less
>> fatal?
>
>This sounds strange. This hasn't changed in 7.2. It was the same in 7.1 and
>7.0. Even in 5.6 and 5.5 it was an E_STRICT. Unless the Windows version has
>somehow drifted, but I don't see how that would be possible. Are you sure
>it isn't caused by something else?

Your example issues an E_STRICT warning, in both PHP 7.2 nts x64 and PHP
7.1 nts x64, so it must be caused by something else.

I have no faint idea (yet) what causes it. I am doing exactly the same:
switch the config from PHP 7.1 as mod_fcgid to PHP 7.2 as mod_fcgid (or
vice versa), restart Apache (2.4.27) and run 'Flush all caches'. Under
PHP 7.2 I get a fatal error and under PHP 7.1 I do not even get a
warning.

The php.ini's are exactly the same, except for the location of the
error_log. Under PHP 7.2, I am also getting a lot of warnings for
deprecated things:
- create_function()
- each()
- count() on a non-Countable variable
Those were expected. But why Drupal7 transforms one warning into a fatal
error beats me.

Talking about bad programming, this was the weirdest each(), found in
menu.inc:
> list($function, $args) = each($function);
each() is supposed to advance the array pointer, but for which
$function? The first or the last in the statement?
-- 
Jan

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

Reply via email to