Reviewed: https://reviews.mahara.org/10658 Committed: https://git.mahara.org/mahara/mahara/commit/a5012e5cdc22dc91770616e68f1b089157579b41 Submitter: Cecilia Vela Gurovic ([email protected]) Branch: master
commit a5012e5cdc22dc91770616e68f1b089157579b41 Author: Lisa Seeto <[email protected]> Date: Mon Dec 9 11:28:09 2019 +1300 Bug 1855023: Warning produced when adding/ editing an image gallery block - changed for loop in get_get_javascript_javascript func to continue when encountering empty filename vars. behatnotneeded Change-Id: I5b65c4beee4465d80911aa3fe08590a358570141 Signed-off-by: Lisa Seeto <[email protected]> -- 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/1855023 Title: Warning produced when adding/ editing an image gallery block Status in Mahara: Fix Committed Status in Mahara 19.10 series: New Status in Mahara 20.04 series: Fix Committed Bug description: A warning message is being produced when adding or editing an image gallery block (see attached screenshot) To reproduce: 1) Log in as any user and create a page 2) Edit the page and select image gallery block, select some images, press save expected results: The page displays with an image gallery and no warnings actual results: The page displays with an image gallery and warnings: "[WAR] 98 (blocktype/lib.php:2104) stripos() expects parameter 1 to be string, array given" This issue is occurring because the javascript function get_get_javascript_javascript($jsfiles) in blocktype/lib.php has been set up to expect a non-empty file entry in its logic in its foreach loop. This is an issue in artefact/file/blocktype/gallery/lib.php in get_instance_javascript() which passes down an array with an empty file entry: array( 'file' => '', 'initjs' => "$('#slideshow{$blockid}').on('slid.bs.carousel', function () { $(window).trigger('colresize'); });" ) The get_get_javascript_javascript($jsfiles) should be amended to handle the above input. Version: 20.04dev To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1855023/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

