From: Robin Appelman Date: Fri, 30 Jul 2010 11:36:18 +0000 (+0200) Subject: fix warnings given by MDB2 if opendir is restricted by the host X-Git-Tag: v3.0~329 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6642d4af6ff44c92e91e347c8ea392efac28f842;p=nextcloud-server.git fix warnings given by MDB2 if opendir is restricted by the host --- diff --git a/inc/MDB2.php b/inc/MDB2.php index aa4259b9db7..faf405b4112 100644 --- a/inc/MDB2.php +++ b/inc/MDB2.php @@ -960,8 +960,8 @@ class MDB2 global $SERVERROOT; if (!@ini_get('safe_mode')) { $dirs = explode(PATH_SEPARATOR, ini_get('include_path')); - $dirs[]=$SERVERROOT; - $dirs[]=$SERVERROOT. DIRECTORY_SEPARATOR .'inc'; + array_unshift($dirs,$SERVERROOT); + array_unshift($dirs,$SERVERROOT. DIRECTORY_SEPARATOR .'inc'); // print_r($dirs);die(); foreach ($dirs as $dir) { if (is_readable($dir . DIRECTORY_SEPARATOR . $file)) {