node_get_types() D5 and php5
This is more of a f.y.i post because I have no idea if the function was changed. But using node_get_types() returns an object that cannot go to string in this code foreach(node_get_types() as $type => $name) { $form[$set][REPORTPOST_NODE_TYPE . $type] = array( '#type' => 'checkbox', '#title' => t($name), '#return_value' => 1, '#default_value' => variable_get(REPORTPOST_NODE_TYPE . $type, 0), ); which causes this error: Object of class stdClass could not be converted to string in F:\wamp5\www\drupal-5.1\includes\form.inc on line 1301. and had to be changed to $name->name. This is not the case in 4.7 for the same code on the same server. This should be noted on the upgrade docs if anyone can confirm. I am not sure if it should be considered a bug as it may have been a designed change. php5,mySQL5, Apache2, Windows2000 Carl Mc Dade ____________________________ Web Developer ____________________________________________________________________________________ Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
On 14.02.2007, at 13:06, Carl Mc Dade wrote:
This is more of a f.y.i post because I have no idea if the function was changed. But using node_get_types() returns an object that cannot go to string in this code
http://api.drupal.org/api/5/function/node_get_types Konstantin Käfer – http://kkaefer.com/
The process of updating your modules will be easier with this reference: http://drupal.org/node/64279 node_get_types changes are covered there as well. -RD -- * * * * * Lullabot's First Ever Advanced Workshops Are Here! Drupal API & Module Building - Advanced Drupal Themeing April 9th-13th - Providence, RI Early Bird Discounts Available Now http://www.lullabot.com/training * * * * *
participants (3)
-
Carl Mc Dade -
Konstantin Käfer -
Robert Douglass