Error - Object of class stdClass could not be converted

csc4 - February 13, 2007 - 17:24
Project:Minutes
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

I'm getting a pathauto error on minute creation - but it only happens with minute creation which is why I'm raising it as an issue here rather than in pathauto.

Catchable fatal error: Object of class stdClass could not be converted to string in D:\xnetpub\whpdd\modules\pathauto\pathauto_node.inc on line 170

I don't know if it helps, but there's a report at http://drupal.org/node/98393 that it is a PHP 5.2 issue?

#1

starbow - March 2, 2007 - 02:05

I think this should be reported over at pathauto. I had the same issue with some cck types. This is definately a PHP 5.2. They have tightened there error reporting. Here is a fix - it is probably over kill, but it works (replace line 170)

<?php
if (!is_object($firsttermid) || method_exists($firsttermid, '__toString')) {
      
$firsttermid_str = (string)$value;
    } else {
      
$firsttermid_str = 'Object';
    }
   
$placeholders[t('[catalias]')] = drupal_get_path_alias('taxonomy/term/'.$firsttermid_str);

//    $placeholders[t('[catalias]')] = drupal_get_path_alias('taxonomy/term/'.$firsttermid);
?>

#2

pukku - March 29, 2007 - 18:16
Status:active» closed

This seems to be a problem with PathAuto. If you can show that it has to do with Minutes, and are able to help me debug, please let me know. Until then, I'm closing this.

 
 

Drupal is a registered trademark of Dries Buytaert.