Tripped up by old typos being caught in new warnings on
PHP 7.x: was checking a scalar's count when meant to
check its containing array's count, and was using a str
"\0" where a literal 0 should have been used (now considered
non-numeric).
Tested locally on 7.2
Bug: T182365
Change-Id: If79a73032d6b63cc41135ccafb6900aeb7787b02
return;
}
- if ( count( $this->mode[0] ) === 0 ) {
+ if ( count( $this->mode ) === 0 ) {
// This should never ever happen and means
// there is a pretty major bug in this class.
throw new RuntimeException( 'Encountered end element with no mode' );
$this->logger->info( __METHOD__ . " Flash structure did not have all the required components" );
$val = null;
} else {
- $val = ( "\0" | ( $val['Fired'] === 'True' )
+ $val = ( 0 | ( $val['Fired'] === 'True' )
| ( intval( $val['Return'] ) << 1 )
| ( intval( $val['Mode'] ) << 3 )
| ( ( $val['Function'] === 'True' ) << 5 )