Index: trunk/extensions/ExternalData/ED_ParserFunctions.php |
— | — | @@ -344,11 +344,18 @@ |
345 | 345 | $params[$j] = str_replace( '{{{' . $variable . '}}}', $value, $params[$j] ); |
346 | 346 | } |
347 | 347 | } |
348 | | - // add $parser to the beginning of the $params array, |
| 348 | + // Add $parser to the beginning of the $params array, |
349 | 349 | // and pass the whole thing in as arguments to |
350 | | - // doSetInternal, to mimic a call to #set_internal |
| 350 | + // doSetInternal, to mimic a call to #set_internal. |
351 | 351 | array_unshift( $params, $parser ); |
352 | | - call_user_func_array( array( 'SIOHandler', 'doSetInternal' ), $params ); |
| 352 | + // As of PHP 5.3.1, call_user_func_array() requires that |
| 353 | + // the function params be references. Workaround via |
| 354 | + // http://stackoverflow.com/questions/2045875/pass-by-reference-problem-with-php-5-3-1 |
| 355 | + $refParams = array(); |
| 356 | + foreach ( $params as $key => $value ) { |
| 357 | + $refParams[$key] = &$params[$key]; |
| 358 | + } |
| 359 | + call_user_func_array( array( 'SIOHandler', 'doSetInternal' ), $refParams ); |
353 | 360 | } |
354 | 361 | return null; |
355 | 362 | } |