Comment 7 for bug 1595789

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/6620
Committed: https://git.mahara.org/mahara/mahara/commit/a334a69e96810dee124bb8a2a19746a59f3cf3a2
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit a334a69e96810dee124bb8a2a19746a59f3cf3a2
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
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