mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #23415
[Bug 1409545] [NEW] RSS block: "Invalid array key 'url'" messages when using an atom feed
Public bug reported:
A client reported that when using the external feed block to display the
Atom feeds of Mahara's own blogs, you'd see this warning message:
[WAR] f9 (blocktype/externalfeed/lib.php:464) Illegal string offset 'url'
Call stack (most recent first):
log_message("Illegal string offset 'url'", 8, true, true, "/home/aaronw/www/mahara/htdocs/blocktype/externalf...", 464) at /home/aaronw/www/mahara/htdocs/lib/errors.php:439
error(2, "Illegal string offset 'url'", "/home/aaronw/www/mahara/htdocs/blocktype/externalf...", 464, array(size 2)) at /home/aaronw/www/mahara/htdocs/blocktype/externalfeed/lib.php:464
PluginBlocktypeExternalfeed::make_feed_image_tag("http://trinity-mahara.testing.elearning.catalyst.n...") at /home/aaronw/www/mahara/htdocs/blocktype/externalfeed/lib.php:98
PluginBlocktypeExternalfeed::render_instance(object(BlockInstance)) at Unknown:0
call_user_func_array(array(size 2), array(size 1)) at /home/aaronw/www/mahara/htdocs/lib/mahara.php:1578
call_static_method("PluginBlocktypeExternalfeed", "render_instance", object(BlockInstance)) at /home/aaronw/www/mahara/htdocs/blocktype/lib.php:782
BlockInstance->render_viewing() at /home/aaronw/www/mahara/htdocs/lib/view.php:2049
View->build_column(1, 1, false) at /home/aaronw/www/mahara/htdocs/lib/view.php:2006
View->build_columns(1, false) at /home/aaronw/www/mahara/htdocs/lib/view.php:1991
View->build_rows() at /home/aaronw/www/mahara/htdocs/view/view.php:257
On looking at the code, it looks like the problem is that the
PluginBlocktypeExternalfeed::make_feed_image_tag() function is in dire
need of a cleanup. It is built to handle an array if the feed is an RSS
feed, and a URL string if the feed is an Atom feed. But it just checks
for array keys directly, rather than checking whether it's an array or
if the array key exists, and although that works, it throws a warning
message.
** Affects: mahara
Importance: Medium
Status: Confirmed
** Tags: externalfeed
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1409545
Title:
RSS block: "Invalid array key 'url'" messages when using an atom feed
Status in Mahara ePortfolio:
Confirmed
Bug description:
A client reported that when using the external feed block to display
the Atom feeds of Mahara's own blogs, you'd see this warning message:
[WAR] f9 (blocktype/externalfeed/lib.php:464) Illegal string offset 'url'
Call stack (most recent first):
log_message("Illegal string offset 'url'", 8, true, true, "/home/aaronw/www/mahara/htdocs/blocktype/externalf...", 464) at /home/aaronw/www/mahara/htdocs/lib/errors.php:439
error(2, "Illegal string offset 'url'", "/home/aaronw/www/mahara/htdocs/blocktype/externalf...", 464, array(size 2)) at /home/aaronw/www/mahara/htdocs/blocktype/externalfeed/lib.php:464
PluginBlocktypeExternalfeed::make_feed_image_tag("http://trinity-mahara.testing.elearning.catalyst.n...") at /home/aaronw/www/mahara/htdocs/blocktype/externalfeed/lib.php:98
PluginBlocktypeExternalfeed::render_instance(object(BlockInstance)) at Unknown:0
call_user_func_array(array(size 2), array(size 1)) at /home/aaronw/www/mahara/htdocs/lib/mahara.php:1578
call_static_method("PluginBlocktypeExternalfeed", "render_instance", object(BlockInstance)) at /home/aaronw/www/mahara/htdocs/blocktype/lib.php:782
BlockInstance->render_viewing() at /home/aaronw/www/mahara/htdocs/lib/view.php:2049
View->build_column(1, 1, false) at /home/aaronw/www/mahara/htdocs/lib/view.php:2006
View->build_columns(1, false) at /home/aaronw/www/mahara/htdocs/lib/view.php:1991
View->build_rows() at /home/aaronw/www/mahara/htdocs/view/view.php:257
On looking at the code, it looks like the problem is that the
PluginBlocktypeExternalfeed::make_feed_image_tag() function is in dire
need of a cleanup. It is built to handle an array if the feed is an
RSS feed, and a URL string if the feed is an Atom feed. But it just
checks for array keys directly, rather than checking whether it's an
array or if the array key exists, and although that works, it throws a
warning message.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1409545/+subscriptions
Follow ups
-
[Bug 1409545] Re: RSS block: "Invalid array key 'url'" messages when using an atom feed
From: Son Nguyen, 2015-04-19
-
[Bug 1409545] Re: RSS block: "Invalid array key 'url'" messages when using an atom feed
From: Robert Lyon, 2015-04-17
-
[Bug 1409545] A change has been merged
From: Mahara Bot, 2015-02-17
-
[Bug 1409545] A patch has been submitted for review
From: Mahara Bot, 2015-02-17
-
[Bug 1409545] Re: RSS block: "Invalid array key 'url'" messages when using an atom feed
From: Aaron Wells, 2015-02-17
-
[Bug 1409545] A change has been merged
From: Mahara Bot, 2015-01-30
-
[Bug 1409545] Re: RSS block: "Invalid array key 'url'" messages when using an atom feed
From: Robert Lyon, 2015-01-30
-
[Bug 1409545] Re: RSS block: "Invalid array key 'url'" messages when using an atom feed
From: Aaron Wells, 2015-01-12
-
[Bug 1409545] Re: RSS block: "Invalid array key 'url'" messages when using an atom feed
From: Aaron Wells, 2015-01-12
-
[Bug 1409545] Re: RSS block: "Invalid array key 'url'" messages when using an atom feed
From: Aaron Wells, 2015-01-11
-
[Bug 1409545] [NEW] RSS block: "Invalid array key 'url'" messages when using an atom feed
From: Aaron Wells, 2015-01-11
References