Commit 263eb365 authored by Ghada El-Zoghbi's avatar Ghada El-Zoghbi Committed by Robert Lyon
Browse files

Bug 1773864: Throw MaharaException with valid error number

Pass error number and message correctly to the
MaharaException call when coming back from the
externalfeed curl call.

Sponsored by Central Queensland University

behatnotneeded

Change-Id: I03a2b666bde3905d2466ffbe35f1b35ca8a088bf
(cherry picked from commit 23287554)
parent ea361fcc
......@@ -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