Page MenuHomePhabricator

Flow: PHP Warnings from TreeRepository and header()
Closed, InvalidPublic

Description

I noticed in fluorine:/a/mw-log/apache2.log

Jan 4 06:34:46 mw1202: PHP Warning: array_shift() expects parameter 1 to be array, null given in /usr/local/apache/common-local/php-1.23wmf9/extensions/Flow/includes/Repository/TreeRepository.php on line 230
Jan 4 06:34:46 mw1202: PHP Warning: header() expects parameter 3 to be long, string given in /usr/local/apache/common-local/php-1.23wmf9/includes/WebResponse.php on line 38

The first line seems familiar, but I can't find other examples. The second has happened on ee-flow, but weeks ago:

9:[Sun Dec 22 21:17:15 2013] [error] [client 130.60.206.75] PHP Warning: header() expects parameter 3 to be long, string given in /srv/mediawiki/includes/WebResponse.php on line 38, referer: http://ee-flow.wmflabs.org/wiki/Talk:Flow_bugs
10:[Sun Dec 22 21:18:09 2013] [error] [client 130.60.206.75] PHP Warning: header() expects parameter 3 to be long, string given in /srv/mediawiki/includes/WebResponse.php on line 38, referer: http://ee-flow.wmflabs.org/wiki/Talk:Flow_bugs

The header() method's third parameter is

  • @param $http_response_code null|int Forces the HTTP response code to the specified value.

Maybe a failed API request or other failure is returning a string and not 500 or whatever. It could be ParsoidUtils.php returning Parsoid's $response...

We should configure labs servers to spew PHP Warnings to the screen.


Version: master
Severity: normal

Details

Reference
bz59640

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:16 AM
bzimport set Reference to bz59640.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

The WMF core features team tracks this bug on Mingle card https://mingle.corp.wikimedia.org/projects/flow/cards/687, but people from the community are welcome to contribute here and in Gerrit.