Skip to content

Commit

Permalink
pkp#7121 Change out create_function for lambda function
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Jun 14, 2021
1 parent d7c2716 commit 50a8e89
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ function() use ($submission) {
$this->_parentForm->addCheck(new FormValidatorLocale($this->_parentForm, $field, 'required', $requiredLocaleKey, $submission->getCurrentPublication()->getData('locale')));
break;
case in_array($field, $this->getTagitFieldNames()):
$this->_parentForm->addCheck(new FormValidatorCustom($this->_parentForm, $field, 'required', $requiredLocaleKey, create_function('$field,$form,$name', '$data = (array) $form->getData(\'keywords\'); return array_key_exists($name, $data);'), array($this->_parentForm, $submission->getCurrentPublication()->getData('locale').'-'.$field)));
$this->_parentForm->addCheck(new FormValidatorCustom($this->_parentForm, $field, 'required', $requiredLocaleKey, function($field, $form, $name) {
$data = (array) $form->getData('keywords');
return array_key_exists($name, $data);
}, array($this->_parentForm, $submission->getCurrentPublication()->getData('locale').'-'.$field)));
break;
case 'citations':
$form = $this->_parentForm;
Expand Down

0 comments on commit 50a8e89

Please sign in to comment.