I'm gettin these warnings together with the 'wysiwyg' module, 'media' module and the 'lightbox2' module, when I'm under admin/configuration/content authoring/text formats has enabled some more filters, especially about the media module and the lightbox2 module.

Notice: Undefined index: #value in fapi_validation_filters_execute() (line 62 of C:\www\arlbergextreme\sites\all\modules\fapi_validation\fapi_validation.module).
Warning: Illegal offset type in isset or empty in fapi_validation_filters_execute() (line 64 of C:\www\arlbergextreme\sites\all\modules\fapi_validation\fapi_validation.module).

The warning line is repeated 14 times.

I'm using Drupal 7.9, Clientside Validation 7.25, Wysiwyg 7.-x.21, Media 7.x-2.x-dev and Lightbox2 7.x-1.0-beta1.

Can you help me here?

Do you need more info?

Should I worry about it?

Comments

jelle_s’s picture

Project: Clientside Validation » Form API Validation
Version: 7.x-1.25 » 7.x-1.0

This is a Form API Validation bug, not a Clientside Validation bug. Moved the issue to the right issue queue :-)

pedrofaria’s picture

Assigned: Unassigned » pedrofaria

You don't need to worry about it... PHP Notices isn't errors...

how can reproduce this Notice?

pedro

nicolasg’s picture

I beleive the problem line is
$value = $element['#value']
Line 62

Those modules form's must not use a #value attribute, therefore when this module tries to execute its rules, it tries to access an undefined index.

A check is needed to see if its set, something like

if(!isset($element['#value'])){ 
//do something different, maybe return or skip this element
}
pedrofaria’s picture

this is a little bit weird... how can I check a rule in a field who don't have value?

BTW, I can add nicolasg suggestion in the code...

myliefie’s picture

I have a simlar issue: Warning: Illegal offset type in isset or empty in fapi_validation_filters_execute() (line 64 of D:\Websites\testsite\sites\all\modules\fapi_validation\fapi_validation.module).

patoshi’s picture

same issue... appearing on input filters page:

http://prntscr.com/6om4e

just add an isset() to check for the variable on that line. should be a quick fix patch.

jaimealsilva’s picture

Subscribing.

I got:

  • Notice: Undefined index: #value en fapi_validation_filters_execute() (línea 62 de /home/ing1/public_html/fecel/sites/all/modules/fapi_validation/fapi_validation.module).
  • Warning: Illegal offset type in isset or empty en fapi_validation_filters_execute() (línea 64 de /home/ing1/public_html/fecel/sites/all/modules/fapi_validation/fapi_validation.module).
  • Warning: Illegal offset type in isset or empty en fapi_validation_filters_execute() (línea 64 de /home/ing1/public_html/fecel/sites/all/modules/fapi_validation/fapi_validation.module).
  • Warning: Illegal offset type in isset or empty en fapi_validation_filters_execute() (línea 64 de /home/ing1/public_html/fecel/sites/all/modules/fapi_validation/fapi_validation.module).
  • Warning: Illegal offset type in isset or empty en fapi_validation_filters_execute() (línea 64 de /home/ing1/public_html/fecel/sites/all/modules/fapi_validation/fapi_validation.module).
  • Warning: Illegal offset type in isset or empty en fapi_validation_filters_execute() (línea 64 de /home/ing1/public_html/fecel/sites/all/modules/fapi_validation/fapi_validation.module).
  • Warning: Illegal offset type in isset or empty en fapi_validation_filters_execute() (línea 64 de /home/ing1/public_html/fecel/sites/all/modules/fapi_validation/fapi_validation.module).
pedrofaria’s picture

Status: Active » Needs review

Fix Committed on dev.

Please, test and review it.

@all, sorry about the ruge delay...

pedrofaria

barraponto’s picture

Status: Needs review » Fixed

If it's commited, it's fixed. Reviews should come first if you're not sure :P
Anyway, if it is still an issue it will be reopened.

Status: Fixed » Closed (fixed)

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