Problem/Motivation
A PHP strict warning is emitted by the following code due to use of the return value of the nested function call as the parameter to array_pop or array_shift, as opposed to a variable. The warning is: "Only variables should be passed by reference."
$default_pivot_col = empty($this->options['pivot_col']) ?
array_pop(array_keys($columns)) :
$this->options['pivot_col'];
$default_pivot_row = empty($this->options['pivot_row']) ?
array_shift(array_keys($columns)) :
$this->options['pivot_row'];
Proposed resolution
Create a variable for the column keys to pass to the outer array function calls.
Remaining tasks
Review and test. No documentation.
User interface changes
None.
API changes
None.
Comments
Comment #1
solotandem commentedAttached patch implements proposed resolution.
Comment #2
jurgenhaasThanks for your patch, this is applied and committed to the dev release.