Bug 1595789: Make NULL urlsecret work during installation
It was failing because we'd set the default value on
param_alphanumext() to "null". But if the default passed
to that function evaluates to false (as null does), then
the function acts as if you've passed no default, and
hence it's a required function.
Further, the template form where we add the urlsecret
to the install button, in case of a null urlsecret,
would wind up adding "urlsecret=" to the end of the
URL. param_alphanumext() would see the presence of
the "urlsecret" query parameter, so it would evaluate
this to match its regex, which requires there to be
at least one character in the value. And then that
would throw a "ParameterException" when the check failed.
Change-Id: I1fb4ed7bcfe14155532e4ebb5d8c0dbdc33d1d36
behatnotneeded: Can't yet test in behat
(cherry picked from commit a334a69e96810dee124bb8a2a19746a59f3cf3a2)
Reviewed: https:/ /reviews. mahara. org/6629 /git.mahara. org/mahara/ mahara/ commit/ 0b5a06064f42207 f903abe411cd071 0fbb31b0e8
Committed: https:/
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE
commit 0b5a06064f42207 f903abe411cd071 0fbb31b0e8
Author: Aaron Wells <email address hidden>
Date: Fri Jun 24 15:15:48 2016 +1200
Bug 1595789: Make NULL urlsecret work during installation
It was failing because we'd set the default value on
param_alphanumext() to "null". But if the default passed
to that function evaluates to false (as null does), then
the function acts as if you've passed no default, and
hence it's a required function.
Further, the template form where we add the urlsecret tion" when the check failed.
to the install button, in case of a null urlsecret,
would wind up adding "urlsecret=" to the end of the
URL. param_alphanumext() would see the presence of
the "urlsecret" query parameter, so it would evaluate
this to match its regex, which requires there to be
at least one character in the value. And then that
would throw a "ParameterExcep
Change-Id: I1fb4ed7bcfe141 55532e4ebb5d8c0 dbdc33d1d36 e124bb8a2a19746 a59f3cf3a2)
behatnotneeded: Can't yet test in behat
(cherry picked from commit a334a69e96810de