Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.6.4, 2.7.1, 2.8
-
Component/s: JavaScript
-
Testing Instructions:
-
Affected Branches:MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
-
Fixed Branches:MOODLE_26_STABLE, MOODLE_27_STABLE
-
Pull from Repository:
-
Pull Master Branch:master_
MDL-46775 -
Pull Master Diff URL:
Description
To reproduce
- Install a fresh instance of master
- Visit [siteurl]/lib/javascript.php/somerandomstring or [siteurl]theme/javascript.php/somerandomstring
- View the network panel of your browser's dev tools
You will see the request returns a 500 error. If you comment out:
define('NO_DEBUG_DISPLAY', true);
in lib/javascript.php and/or theme/javascript.php
You will get an error:
Fatal error: Call to undefined function image_not_found() in /home/simonc/code/mdl22/lib/javascript.php on line 38
This is because the function image_not_found() is not available from this file.
I'm happy to provide a patch for this, but wanted to confirm the preferred approach. Personally I would replace image_not_found() with die(); since it is not an image anyway and die() is used later in that file.
Alternatively I could create a new function js_not_found().