function views_bulk_operations_script_action in Views Bulk Operations (VBO) 6
Same name and namespace in other branches
- 6.3 script.action.inc \views_bulk_operations_script_action()
- 7.3 actions/script.action.inc \views_bulk_operations_script_action()
File
- actions/
script.action.inc, line 19
Code
function views_bulk_operations_script_action(&$object, $context) {
$return = eval($context['script']);
if ($return === FALSE) {
$msg = 'Error in script.';
$arg = array();
if (function_exists('error_get_last') && ($error = error_get_last())) {
$msg = '!err in script: !msg in line \'%line\'.';
$arg = array(
'!msg' => $error['message'],
'%line' => _views_bulk_operations_script_action_error_line($context['script'], $error['line']),
'!err' => _views_bulk_operations_script_action_error_type($error['type']),
);
}
drupal_set_message(t($msg, $arg), 'error', FALSE);
watchdog('vbo', $msg, $arg, WATCHDOG_ERROR);
}
}