PHP notices

oriol_e9g - September 16, 2008 - 17:45
Project:Node Images
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:patch (code needs work)
Description

I have found more PHP Notices.

When you enter in the add new content form (node/add/story):

* notice: Undefined property: stdClass::$nid in .../sites/all/modules/node_images/node_images.module on line 130.

* notice: Undefined property: stdClass::$nid in .../sites/all/modules/node_images/node_images.module on line 835.

* notice: Undefined property: stdClass::$node_images in .../sites/all/modules/node_images/node_images.module on line 364.

* notice: Undefined variable: user in .../sites/all/modules/node_images/node_images.module on line 333.

When you add a new image in the add content form:

* notice: Undefined variable: form in .../sites/all/modules/node_images/node_images.module on line 532.

* notice: Undefined variable: user in .../sites/all/modules/node_images/node_images.module on line 333.

When you upload a new image in the images tab.":

* notice: Undefined index: #node in .../sites/all/modules/node_images/node_images.module on line 525.

* notice: Trying to get property of non-object in .../sites/all/modules/node_images/node_images.module on line 525.

And finally and extra notification, but I don't known if it's node_images problem or Drupal problem.

When you have created a new node and appear the notification message "Click the !images tab to edit node images.":

* notice: Undefined index: upload in .../includes/file.inc on line 494.

#1

stefano73 - September 16, 2008 - 18:33
Status:active» patch (code needs review)

I fixed the warnings in the attached node_images file. Can you please download and check if all warnings (except last one) are gone? If yes, I will commit it to CVS.
As for the latest warning, can you disable the upload module and see if it still shows?
Thanks.

AttachmentSize
node_images.zip8.02 KB

#2

oriol_e9g - September 16, 2008 - 19:13

I have tested the same with this new version:

When you enter in the "add new content" form (node/add/story):

* notice: Undefined property: stdClass::$nid in .../sites/all/modules/node_images/node_images.module on line 837.

When you add a new image in the add content form:

fixed!

When you upload a new image in the images tab:

fixed!

#Extra ball: if I disable the upload module don't appear the last warning.

#3

stefano73 - September 16, 2008 - 21:16

Fixed all the warnings and committed to CVS (v1.11.2.11). Thanks for testing.

#4

oriol_e9g - September 18, 2008 - 09:51
Status:patch (code needs review)» patch (code needs work)

One more warning :S

When you add a new image in the "node/add/story" form there aren't notices but when you add the second image appear a new warning:

notice: Undefined index: filemime in .../sites/all/modules/node_images/node_images.module on line 557.

 
 

Drupal is a registered trademark of Dries Buytaert.