Refer from https://www.drupal.org/node/2591327#comment-10608502

Fix @klausi manual review.

  1. node_title_validation_node_validate(): $node_title_validation_config['exclude-' . $node->type]: this will throw PHP warnings if that array key is not set. You should add a check that it is actually set. Same for the other array keys that you are accessing here. Example: if a new node type is added then the array is out of sync.
  2. node_title_validation_admin_form_validate(): doc block is wrong, this is not a hook. See https://www.drupal.org/coding-standards/docs#forms . Same for node_title_validation_admin_form_submit().
  3. node_title_validation_admin_form_validate(): instead of doing the numeric validation yourself, you can use element_validate_integer_positive as a #element_validate callback, see
    https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.h...
CommentFileSizeAuthor
#2 2623622-2.patch2.62 KBneerajskydiver
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

krknth created an issue. See original summary.

neerajskydiver’s picture

Status: Active » Needs review
FileSize
2.62 KB

Patch attached

krknth’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

  • neerajskydiver committed 123b12d on 7.x-1.x
    Issue #2623622 by neerajskydiver: Fix @klausi manual review
    
krknth’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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