ajax bug in 1.2.4
Posted: Thu Jun 17, 2010 5:04 pm
Hi, Steve
I found a bug in 1.2.4 when deleting an attachement, while I do it well in 1.2.2. Our application uses E_ALL level for error reporting. Here's how I recreate the bug:
In 1.2.4, $fieldDef['mimetype'] is undefined at line 62 in xataface/actions/delete_file.php, and evaluating it will result in a E_NOTICE because of E_ALL level of error reporting. In chain, it returns this as part of the response to XHR object, even if all actions were completely done. That's why an exception is thrown in xataface/js/delete_file.js.
In 1.2.2, since you put the following code in xataface/dataface-public-api.php at line 44, the problem above won't happen because E_NOTICE will not be reported:
Can we do something to solve this problem, or you would consider this as a bug?
I found a bug in 1.2.4 when deleting an attachement, while I do it well in 1.2.2. Our application uses E_ALL level for error reporting. Here's how I recreate the bug:
In 1.2.4, $fieldDef['mimetype'] is undefined at line 62 in xataface/actions/delete_file.php, and evaluating it will result in a E_NOTICE because of E_ALL level of error reporting. In chain, it returns this as part of the response to XHR object, even if all actions were completely done. That's why an exception is thrown in xataface/js/delete_file.js.
- Code: Select all
$mimeTypeField =& $record->_table->getField($fieldDef['mimetype']);
In 1.2.2, since you put the following code in xataface/dataface-public-api.php at line 44, the problem above won't happen because E_NOTICE will not be reported:
- Code: Select all
error_reporting(E_ALL^E_NOTICE);
Can we do something to solve this problem, or you would consider this as a bug?