Full error message:
PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'field_mme_makemeeting_limit' at row 1: INSERT INTO {field_data_field_mme_makemeeting} (entity_type, entity_id, revision_id, bundle, delta, language, field_mme_makemeeting_closed, field_mme_makemeeting_hidden, field_mme_makemeeting_one_option, field_mme_makemeeting_limit, field_mme_makemeeting_yesnomaybe, field_mme_makemeeting_choices) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 108 [:db_insert_placeholder_2] => 108 [:db_insert_placeholder_3] => meetingpoll [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 0 [:db_insert_placeholder_7] => 0 [:db_insert_placeholder_8] => 0 [:db_insert_placeholder_9] => [:db_insert_placeholder_10] => 0 [:db_insert_placeholder_11] => a:3:{i:1497052800;a:2:{s:6:"chdate";a:3:{s:3:"day";s:2:"10";s:5:"month";s:1:"6";s:4:"year";s:4:"2017";}s:13:"chsuggestions";a:1:{s:6:"sugg:0";s:0:"";}}i:1497139200;a:2:{s:6:"chdate";a:3:{s:3:"day";s:2:"11";s:5:"month";s:1:"6";s:4:"year";s:4:"2017";}s:13:"chsuggestions";a:1:{s:6:"sugg:0";s:0:"";}}i:1497225600;a:2:{s:6:"chdate";a:3:{s:3:"day";s:2:"12";s:5:"month";s:1:"6";s:4:"year";s:4:"2017";}s:13:"chsuggestions";a:1:{s:6:"sugg:0";s:0:"";}}} ) in field_sql_storage_field_storage_write() (Zeile 514 von ...modules/field/modules/field_sql_storage/field_sql_storage.module).
How to reproduce:
When adding/editing a poll, delete the integer in edit-field-[yourfieldname]-makemeeting-und-0-limit ("Limit the number of participants per option")
Make sure this is the only error on the form, then a PDOException appears.
makemeeting.field.inc uses element_validate_integer for $element['limit'] but as the field is not required, it could also be an empty string, which isn't catched anywhere.
Comments
Comment #2
indigoxela commentedComment #3
indigoxela commented