Commit a62746c4 authored by Chenu Denis's avatar Chenu Denis
Browse files

[fix] 500 error with invalid email on original token

parent 9e8d4f38
......@@ -8,7 +8,7 @@
<author>Denis Chenu</author>
<authorUrl>https://extensions.sondages.pro/</authorUrl>
<supportUrl>https://support.sondages.pro/</supportUrl>
<version>1.13.4</version>
<version>1.14.1</version>
<license>GNU Affero General Public License v3.0</license>
<description><![CDATA[Use a question to add survey inside another survey visually like a spreadsheet.]]></description>
</metadata>
......
......@@ -6,7 +6,7 @@
* @copyright 2020-2021 Denis Chenu <www.sondages.pro>
* @copyright 2020-2021 OECD (Organisation for Economic Co-operation and Development ) <www.oecd.org>
* @license AGPL v3
* @version 1.14.0.1
* @version 1.14.1
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
......@@ -705,12 +705,13 @@ class questionSpreadsheetSurvey extends PluginBase
ARRAY_FILTER_USE_KEY
);
$oToken->setAttributes($updatableAttribute, false);
$oToken->scenario = 'allowinvalidemail'; /* Email get from another one */
if ($oToken->save()) {
$this->log(sprintf("Auto create token %s for %s.", $basetoken, $extraSurvey->sid), 'info');
return true;
} else {
$this->log(sprintf("Unable to create auto create token %s for %s.", $basetoken, $extraSurvey->sid), 'error');
$this->log(CVarDumper::dumpAsString($oToken->getErrors), 'info');
$this->log(CVarDumper::dumpAsString($oToken->getErrors()), 'info');
return false;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment