Skip to content
Snippets Groups Projects
Commit ce070a9f authored by chris's avatar chris
Browse files

fix for PHP5/Win, avoid initialising an array as a function parameter

darcs-hash:20060202232249-9b6ab-714f97dd150f2e0e7bef5458ab74f5336a1e5f8c.gz
parent 67019d15
No related branches found
No related tags found
No related merge requests found
......@@ -294,8 +294,9 @@ function io_download($url,$file,$useAttachment=false,$defaultName=''){
$name = '';
if (isset($http->resp_headers['content-disposition'])) {
$content_disposition = $http->resp_headers['content-disposition'];
$match=array();
if (is_string($content_disposition) &&
preg_match('/attachment;\s*filename\s*=\s*"([^"]*)"/i', $content_disposition, $match=array())) {
preg_match('/attachment;\s*filename\s*=\s*"([^"]*)"/i', $content_disposition, $match)) {
$name = basename($match[1]);
}
......
......@@ -124,8 +124,8 @@ if (!class_exists('configuration')) {
$contents = @php_strip_whitespace($file);
$pattern = '/\$'.$this->_name.'\[[\'"]([^=]+)[\'"]\] ?= ?(.*?);/';
preg_match_all($pattern,$contents,$matches=array(),PREG_SET_ORDER);
$matches=array();
preg_match_all($pattern,$contents,$matches,PREG_SET_ORDER);
for ($i=0; $i<count($matches); $i++) {
......
......@@ -229,7 +229,8 @@ class ap_manage {
global $lang;
// check the url
if (!preg_match("/[^\/]*$/", $url, $matches = array()) || !$matches[0]) {
$matches = array();
if (!preg_match("/[^\/]*$/", $url, $matches) || !$matches[0]) {
$this->manager->error = $this->lang['error_badurl']."\n";
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment