1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Issue 500 header if Captcha image fails.

This commit is contained in:
Cameron
2018-08-13 11:11:32 -07:00
parent acfaf2df8e
commit fd8bb93192
3 changed files with 5 additions and 1 deletions

View File

@@ -571,9 +571,10 @@ function update_core_database($type = '')
// add common video and audio media categories if missing. // add common video and audio media categories if missing.
$count = $sql->select("core_media_cat","*","media_cat_category = '_common_video' LIMIT 1 "); $count = $sql->select("core_media_cat","*","media_cat_category = '_common_video' LIMIT 1 ");
if(!$count) if(!$count)
{ {
if ($type !== 'do') return update_needed('Media-Manager is missing the video and audio categories and needs to be updated.'); if ($just_check) return update_needed('Media-Manager is missing the video and audio categories and needs to be updated.');
$sql->gen("INSERT INTO `".MPREFIX."core_media_cat` VALUES(0, '_common', '_common_video', '(Common Videos)', '', 'Media in this category will be available in all areas of admin. ', 253, '', 0);"); $sql->gen("INSERT INTO `".MPREFIX."core_media_cat` VALUES(0, '_common', '_common_video', '(Common Videos)', '', 'Media in this category will be available in all areas of admin. ', 253, '', 0);");
$sql->gen("INSERT INTO `".MPREFIX."core_media_cat` VALUES(0, '_common', '_common_audio', '(Common Audio)', '', 'Media in this category will be available in all areas of admin. ', 253, '', 0);"); $sql->gen("INSERT INTO `".MPREFIX."core_media_cat` VALUES(0, '_common', '_common_audio', '(Common Audio)', '', 'Media in this category will be available in all areas of admin. ', 253, '', 0);");

View File

@@ -265,7 +265,9 @@ class secure_image
} }
else else
{ {
echo "Render Failed"; echo "Render Failed";
http_response_code(500);
exit; exit;
} }

View File

@@ -23,6 +23,7 @@
*/ */
// error_reporting(E_ALL); // error_reporting(E_ALL);
// define('e107_INIT', true); // define('e107_INIT', true);
$_E107 = array();
$_E107['no_online'] = true; $_E107['no_online'] = true;
$_E107['no_forceuserupdate'] = true; $_E107['no_forceuserupdate'] = true;
$_E107['no_menus'] = true; $_E107['no_menus'] = true;