Skip to content

Instantly share code, notes, and snippets.

@joebordes
Created September 15, 2017 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joebordes/da97827ebb0ceb416ac7cacdb85088dd to your computer and use it in GitHub Desktop.
Save joebordes/da97827ebb0ceb416ac7cacdb85088dd to your computer and use it in GitHub Desktop.
Patch to get coreBOS working on PHP 5.3
diff --git a/index.php b/index.php
index 8aaea9b..f422c3c 100644
--- a/index.php
+++ b/index.php
@@ -118,8 +118,8 @@ $is_action = false;
if (isset($_REQUEST['module'])) {
$module = vtlib_purify($_REQUEST['module']);
if (!preg_match('/[\/.]/',$module)) {
- $dir = @scandir($root_directory.'modules', SCANDIR_SORT_NONE);
- $in_dir = @scandir($root_directory.'modules/'.$module, SCANDIR_SORT_NONE);
+ $dir = @scandir($root_directory.'modules');
+ $in_dir = @scandir($root_directory.'modules/'.$module);
$is_module = @in_array($module,$dir);
$is_action = @in_array($action.'.php',$in_dir);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment