I'm using Domain Path and Display Suite's view mode switcher together on a node form. When I switch the node's view mode, there's an in-page AJAX request that updates part of the form, and domain_path_node_validate() is called as part of the AJAX form processing.

At that point in the processing, there's no value for $form_state['values']['op'], which domain_path_node_validate() tests to see if the node is being deleted. This results in a PHP notice.

An isset() check should be all that's needed here.

CommentFileSizeAuthor
#1 domain_path-2155507-1.patch719 bytesLes Lim
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Les Lim’s picture

Status: Active » Needs review
FileSize
719 bytes

Patch attached.

Stefan Looij’s picture

Just letting you know this small fix did remove the PHP notice for me.

bnadem’s picture

I confirm that this patch removed the PHP Notice for me too.
Thanks for sharing this ;)

agentrickard’s picture

Status: Needs review » Reviewed & tested by the community

Two reviews means you can mark it RTBC.

i-trokhanenko’s picture

Committed patch #1

i-trokhanenko’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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