Full bug title: insert into field like "col[a]" fails (Unknown column)
I've confirmed this bug's behaviour in two places: tbl_relation.php and tbl_change.php
Both use the fieldname inside square brackets in a HTML name attribute.
Since according to MySQL a filedname like "foo[bar]" is allowed I think we should not fail on this.
Also, when other exotic characters are used in a fieldname this may not go well. But it would certainly violate the html specs.
My solution is to include an extra hidden HTML field containing the fieldname. A mapping to this can be done using a md5 of the fieldname.
Whenever $key is used in tbl_replace.php to represent the fieldname explicitly, a mapping is required using "$me_fields_name[$key]".
patch for bug#1746964
Merged in subversion, thanks.
Herman,
could you have a look at this: after applying this patch to trunk (revision 12243) we no longer can upload a file to a BLOB when inserting or editing a row.
I think I found the problem in several html name attributes of which the value was not yet updated.
I'll try to do some more testing this evening, and hopefully commit it myself by then :).
Committed to trunk in rev 12246.
See also revision 12331 for a fix: patch #2602633 broke the unNullify() mechanism.
Works like a charm! This definitely fixes bug#1746964 for me. A quick test proofed me that it's no longer a problem to edit (multiple) fields (at once) that contain brackets.
Thanks a lot Herman (and lem9 for merging)!
If there's anything else worth reporting, I'll let you know. :)