* (bug 9026) Incorrect heading numbering when viewing Special:Statistics with
"auto-numbered headings" enabled
* Fixed invalid XHTML in Special:Upload
+* (bug 11013) Make sure dl() is available before attempting to use it to check
+ available databases in installer
== API changes since 1.10 ==
$phpdatabases = array();
foreach (array_keys($ourdb) as $db) {
$compname = $ourdb[$db]['compile'];
- if (extension_loaded($compname) or dl($compname . '.' . PHP_SHLIB_SUFFIX)) {
+ if( extension_loaded( $compname ) || ( mw_have_dl() && dl( "{$compname}." . PHP_SHLIB_SUFFIX ) ) ) {
array_push($phpdatabases, $db);
$ourdb[$db]['havedriver'] = 1;
}
return $path;
}
-?>
+/**
+ * Is dl() available to us?
+ *
+ * According to http://uk.php.net/manual/en/function.dl.php, dl()
+ * is *not* available when `enable_dl` is off, or under `safe_mode`
+ *
+ * @return bool
+ */
+function mw_have_dl() {
+ return function_exists( 'dl' )
+ && is_callable( 'dl' )
+ && ini_get( 'enable_dl' )
+ && !ini_get( 'safe_mode' );
+}
\ No newline at end of file