notice: Object of class stdClass could not be converted to int

salvis - July 5, 2008 - 14:58
Project:Mail editor
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Enabling mail_edit under the CVS version of D6 (not the very latest one) produces

notice: Object of class stdClass could not be converted to int in ...\includes\menu.inc on line 2255.

While it's just a notice, it probably points to an error.

#1

litwol - July 10, 2008 - 19:35
Status:active» fixed

i cant reproduce.

#2

salvis - July 20, 2008 - 17:43

Do you have the CVS version (the tip of the DRUPAL-6 branch)? Notices are disabled on release versions.

#3

salvis - July 23, 2008 - 14:40
Status:fixed» active

In the current tip of the DRUPAL-6 branch (and the current -dev snapshot of mail_edit) it's now

notice: Object of class stdClass could not be converted to int in ...\includes\menu.inc on line 2266.

#4

salvis - July 26, 2008 - 10:19

I can't find the reason for the notice. I'm looking at line 2266 in ...\includes\menu.inc:

  array_multisort($sort, SORT_NUMERIC, $menu);

When mail_edit is disabled (it's not true that I have to uninstall it to get the notice to disappear, I just need to refresh the page after disabling it), I have 283 elements in the arrays and it sorts fine.

When mail_edit is enabled, admin/build/mail-edit and admin/build/mail-edit/%/% are added for a total of 285 elements, and array_multisort() throws the notice!

The arrays look perfectly fine though, including your entries, and the sorting produces the expected result. I'm stumped...

This is PHP 5.1.6 — maybe it's a PHP fluke. I guess I just have to live with the notice. You can close this.

#5

litwol - July 26, 2008 - 10:34
Status:active» fixed

#6

Anonymous (not verified) - August 9, 2008 - 10:42
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.