Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #3017 - PHP 7 / undefined constant THIS_SCRIPT #3092

Merged
merged 2 commits into from Apr 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions global.php
Expand Up @@ -29,11 +29,6 @@
$groupscache = $cache->read('usergroups');
}

if(!defined('THIS_SCRIPT'))
{
define('THIS_SCRIPT', '');
}

$current_page = my_strtolower(basename(THIS_SCRIPT));

// Send page headers - don't send no-cache headers for attachment.php
Expand Down
6 changes: 6 additions & 0 deletions inc/init.php
Expand Up @@ -14,6 +14,12 @@
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

// Fallback
if(!defined('THIS_SCRIPT'))
{
define('THIS_SCRIPT', 'unknown');
}

/* Defines the root directory for MyBB.

Uncomment the below line and set the path manually
Expand Down