List Info

Thread: Re: node_get_types() D5 and php5




Re: node_get_types() D5 and php5
country flaguser name
Sweden
2007-02-14 11:35:37
Well, I don't want to get into a big thing about this but they both say that they return arrays. When in actual use 5.0 returns an object. At least PHP thinks so if you use gettype().

4.7) "An array consisting ('#type' => name) pairs".

5.0) "Either an array of all available node types, or a single node type, in a variable format".

This should probably go over to the documentation list for correction. But do they have control over  core comments?
 
Carl Mc Dade
____________________________
Web Developer


 


----- Original Message ----
From: Earl Miles <merlinlogrus.com>
To: developmentdrupal.org
Sent: Wednesday, February 14, 2007 5:19:52 PM
Subject: Re: [development] node_get_types() D5 and php5

Carl Mc Dade wrote:
>;
>
> "The |node_get_names()| function no longer exists. Please use
> |node_get_types('name', $node)| instead. Similarly, the
> |node_get_base()| function no longer exists. Please use
> |node_get_types('module', $node)| instead."
>
> Which did not apply to my situation since it was already there in the
> code. In the api there is no mention of a change in the functions
> behavior either. Previously I was getting the right behaviour by just

Really? Compare:

http://api.drupal.org/api/4.7/function/node_get_types

to

http://api.drupal.org/api/head/function/node_get_types

The return value is notably different.

I realize not every single detail is covered in the updating modules page, but
the change IS documented in the api.




Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster.
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )