with both location and diff module. and when I run a diff on two different revisions of a node I receive the following error

warning: Missing argument 3 for location_diff() in /var/www/vhosts/nafof.org.uk/httpdocs/sites/all/modules/location/location.module on line 1345.

hope this helps.

Richard

Comments

akahn’s picture

Priority: Normal » Critical

I'm experiencing something similar. The error I get is: Fatal error: Cannot use object of type stdClass as array in /mnt/internetforeveryone.org/sites/all/modules/location/location.module on line 1436

The function that line is from is:

 /**
 * Strip junk out of a location.
 */
function location_strip(&$location) {
  static $tmp;
  if (!isset($tmp)) {
    $tmp = array();
    $defaults = location_invoke_locationapi($location, 'defaults');
    foreach ($defaults as $k => $v) {
      $tmp[$k] = TRUE;
    }
  }
  foreach ($location as $k => $v) {
    if (!isset($tmp[$k])) {
      unset($location[$k]);
    }
  }
}

The line in question is unset($location[$k]);

Richard, what version of Location are you using? I'm using 3.0. And I'm doing this on a content type that doesn't use location.

(Raising this to critical since Location is a fairly common module and this breaks diff.)

akahn’s picture

Priority: Critical » Normal
Status: Active » Closed (duplicate)

This is a duplicate of #350842: [master]Error related to location_diff() when trying to show diff between revisions

And is already fixed in 3.x-dev, and will likely be in the next stable release.