Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Using release 7.x-3.x-dev|2011-Jun-01.
After exporting a node, the following message was generated:
Strict warning: Only variables should be passed by reference in node_export() (line 334 of C:\dev\sites\all\modules\contrib\node_export\node_export.module).
The code:
332: // Get the node code from the format handler
333: $format_handlers = node_export_format_handlers();
334: $format_handler = $format ? $format : reset(variable_get('node_export_format', array('node_code')));
335: if (!isset($format_handlers[$format_handler])) {
336: $format_handler = 'node_code';
337: }
PHP's reset() takes a referenced array variable. Apparently, functions that have arguments passed by reference "don't like" vars returned by functions...
Anyway, it should be an easy fix:
$node_export_format = variable_get('node_export_format', array('node_code'));
$format_handler = $format ? $format : reset($node_export_format);
Comments
Comment #1
danielb CreditAttribution: danielb commentedthanks