Commit 31f4f3a6 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge changes I03a2b666,I38cf1f6d

* changes:
  Bug 1773864: Throw MaharaException with valid error number
  Bug 1774309: Only redirect with QUERY_STRING when it exists
parents 6c845595 23287554
......@@ -1816,7 +1816,7 @@ function login_submit(Pieform $form, $values) {
}
// Do redirect on login to avoid browser back button exploit
$requesturi = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
$requesturi = $_SERVER['SCRIPT_NAME'] . (!empty($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : '');
redirect($requesturi);
}
......
......@@ -419,8 +419,8 @@ class PluginBlocktypeExternalfeed extends MaharaCoreBlocktype {
$result = mahara_http_request($config, true);
if ($result->error) {
throw new MaharaException('Feed url returned error', $result->error);
if ($result->errno) {
throw new MaharaException('Feed url returned error: ' . $result->error, $result->errno);
}
if (empty($result->data)) {
......
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