-
Bug
-
Resolution: Fixed
-
Minor
-
2.6.4, 2.7.1, 2.8
-
MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
-
MOODLE_26_STABLE, MOODLE_27_STABLE
-
master_
MDL-46775 -
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().