← Back to team overview

mahara-contributors team mailing list archive

[Bug 1409545] A change has been merged

 

Reviewed:  https://reviews.mahara.org/4288
Committed: http://gitorious.org/mahara/mahara/commit/dd3a64579d871b09456ab935cdea035961e80671
Submitter: Aaron Wells (aaronw@xxxxxxxxxxxxxxx)
Branch:    1.10_STABLE

commit dd3a64579d871b09456ab935cdea035961e80671
Author: Aaron Wells <aaronw@xxxxxxxxxxxxxxx>
Date:   Mon Jan 12 11:16:06 2015 +1300

Fix "Invalid array key 'url'" warnings

Bug 1409545: Also cleaning up this old & messy function

Change-Id: I9c338aa35208148811bdfe77aee4938f23d8313f

-- 
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:
  Fix Committed
Status in Mahara 1.10 series:
  Fix Committed
Status in Mahara 1.8 series:
  Won't Fix
Status in Mahara 1.9 series:
  Won't Fix
Status in Mahara 15.04 series:
  Fix Committed

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


References