Skip to content

Commit

Permalink
Fixing issue with params getting confused in PHP plugin. But it's
Browse files Browse the repository at this point in the history
probably a bandaid.  Calling getProcessData(), which calls
getEmailValues(), BEFORE getParams() causes params to get confused if
you have multiple plugin.  So the second plugin winds up running the
code from the first one.  But we really need to find out WHY this
happens, as I think we have a few other lurking issues caused by the
same underlying problem.  I have a feeling it's to do with the
form-plugin runPlugins() getting called from within code run by
runPlugins().
  • Loading branch information
cheesegrits committed Feb 7, 2015
1 parent 1e59b67 commit d78ef5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/fabrik_form/php/php.php
Expand Up @@ -362,6 +362,8 @@ public function onError()

private function _runPHP($groupModel = null, $data = null)
{
$params = $this->getParams();

if (is_null($data))
{
$data = $this->getProcessData();
Expand All @@ -371,7 +373,7 @@ private function _runPHP($groupModel = null, $data = null)
* if you want to modify the submitted form data
* $formModel->updateFormData('tablename___elementname', $newvalue);
*/
$params = $this->getParams();

$formModel = $this->getModel();
$method = $params->get('only_process_curl');
/*
Expand Down

0 comments on commit d78ef5e

Please sign in to comment.