Saving node with no taxonomy cause php warning

pokurek - November 10, 2009 - 21:50
Project:Taxonomy Menu
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:fixed
Description

When I save a node with no taxonomy, then php warning occurs.

warning: array_keys() [function.array-keys]: The first argument should be an array in /opt/drupal/6.x/modules/taxonomy_menu/taxonomy_menu.module on line 328.
warning: implode() [function.implode]: Invalid arguments passed in /opt/drupal/6.x/modules/taxonomy_menu/taxonomy_menu.database.inc on line 160.

$node->taxonomy property is not set in $node_tids = array_keys($node->taxonomy);

Is it possible to check if node has a taxonomy?

#1

pokurek - November 19, 2009 - 11:13

I do this check. If it is enough.

AttachmentSize
taxonomy_menu.patch 788 bytes

#2

indytechcook - November 25, 2009 - 01:57
Status:active» fixed

This code was removed in the latest dev.

 
 

Drupal is a registered trademark of Dries Buytaert.