2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

First lot of compatability fixes

This commit is contained in:
Adam Zammit
2023-04-26 14:33:56 +10:00
parent c50a061eaf
commit dddd05665e
28 changed files with 116 additions and 116 deletions

View File

@@ -875,13 +875,13 @@ class PEAR_PackageFile_Generator_v1
}
//o <install as=..> tags for <file name=... platform=!... install-as=..>
if (isset($package['platform'][$file]) &&
$package['platform'][$file]{0} == '!') {
$package['platform'][$file][0] == '!') {
$generic[] = $file;
continue;
}
//o <ignore> tags for <file name=... platform=... install-as=..>
if (isset($package['platform'][$file]) &&
$package['platform'][$file]{0} != '!') {
$package['platform'][$file][0] != '!') {
$genericIgnore[] = $file;
continue;
}
@@ -890,7 +890,7 @@ class PEAR_PackageFile_Generator_v1
if (isset($package['install-as'][$file])) {
continue;
}
if ($platform{0} != '!') {
if ($platform[0] != '!') {
//o <ignore> tags for <file name=... platform=...>
$genericIgnore[] = $file;
}
@@ -899,7 +899,7 @@ class PEAR_PackageFile_Generator_v1
$oses = $notplatform = $platform = array();
foreach ($package['platform'] as $file => $os) {
// get a list of oses
if ($os{0} == '!') {
if ($os[0] == '!') {
if (isset($oses[substr($os, 1)])) {
continue;
}
@@ -945,7 +945,7 @@ class PEAR_PackageFile_Generator_v1
// <file name=... platform=!other platform install-as=..>
if (isset($package['platform'][$file]) &&
$package['platform'][$file] != "!$os" &&
$package['platform'][$file]{0} == '!') {
$package['platform'][$file][0] == '!') {
$release[$releaseNum]['filelist']['install'][] =
array(
'attribs' => array(
@@ -970,7 +970,7 @@ class PEAR_PackageFile_Generator_v1
//o <ignore> tags for
// <file name=... platform=other platform install-as=..>
if (isset($package['platform'][$file]) &&
$package['platform'][$file]{0} != '!' &&
$package['platform'][$file][0] != '!' &&
$package['platform'][$file] != $os) {
$release[$releaseNum]['filelist']['ignore'][] =
array(
@@ -996,7 +996,7 @@ class PEAR_PackageFile_Generator_v1
continue;
}
//o <ignore> tags for <file name=... platform=other platform>
if ($platform{0} != '!' && $platform != $os) {
if ($platform[0] != '!' && $platform != $os) {
$release[$releaseNum]['filelist']['ignore'][] =
array(
'attribs' => array(

View File

@@ -752,7 +752,7 @@ http://pear.php.net/dtd/package-2.0.xsd',
}
}
if (is_string($value) && $value && ($value{strlen($value) - 1} == "\n")) {
if (is_string($value) && $value && ($value[strlen($value) - 1] == "\n")) {
$value .= str_repeat($this->options['indent'], $this->_tagDepth);
}
$tmp .= $this->_createXMLTag(array(
@@ -1501,7 +1501,7 @@ class PEAR_PackageFile_Generator_v2_XML_Util {
function isValidName($string)
{
// check for invalid chars
if (!preg_match("/^[[:alnum:]_\-.]$/", $string{0})) {
if (!preg_match("/^[[:alnum:]_\-.]$/", $string[0])) {
return PEAR_PackageFile_Generator_v2_XML_Util::raiseError( "XML names may only start with letter or underscore", PEAR_PackageFile_Generator_v2_XML_Util_ERROR_INVALID_START );
}

View File

@@ -1192,7 +1192,7 @@ class PEAR_PackageFile_v1
$this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE,
array('file' => $file, 'role' => $fa['role'], 'roles' => PEAR_Common::getFileRoles()));
}
if ($file{0} == '.' && $file{1} == '/') {
if ($file[0] == '.' && $file[1] == '/') {
$this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME,
array('file' => $file));
}
@@ -1573,7 +1573,7 @@ class PEAR_PackageFile_v1
foreach ($methods as $method) {
$function = "$class::$method";
$key = "function;$function";
if ($method{0} == '_' || !strcasecmp($method, $class) ||
if ($method[0] == '_' || !strcasecmp($method, $class) ||
isset($this->_packageInfo['provides'][$key])) {
continue;
}
@@ -1584,7 +1584,7 @@ class PEAR_PackageFile_v1
foreach ($srcinfo['declared_functions'] as $function) {
$key = "function;$function";
if ($function{0} == '_' || isset($this->_packageInfo['provides'][$key])) {
if ($function[0] == '_' || isset($this->_packageInfo['provides'][$key])) {
continue;
}
if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) {

View File

@@ -405,7 +405,7 @@ class PEAR_PackageFile_v2_Validator
foreach ($tags as $i => $tag) {
if (!is_array($tag) || !isset($tag['attribs'])) {
foreach ($choice['attribs'] as $attrib) {
if ($attrib{0} != '?') {
if ($attrib[0] != '?') {
$ret &= $this->_tagHasNoAttribs($choice['tag'],
$context);
continue 2;
@@ -413,7 +413,7 @@ class PEAR_PackageFile_v2_Validator
}
}
foreach ($choice['attribs'] as $attrib) {
if ($attrib{0} != '?') {
if ($attrib[0] != '?') {
if (!isset($tag['attribs'][$attrib])) {
$ret &= $this->_tagMissingAttribute($choice['tag'],
$attrib, $context);
@@ -435,9 +435,9 @@ class PEAR_PackageFile_v2_Validator
}
return $ret;
}
$multi = $key{0};
$multi = $key[0];
if ($multi == '+' || $multi == '*') {
$ret['multiple'] = $key{0};
$ret['multiple'] = $key[0];
$key = substr($key, 1);
}
if (count($attrs = explode('->', $key)) > 1) {
@@ -1025,8 +1025,8 @@ class PEAR_PackageFile_v2_Validator
foreach ($list['file'] as $i => $file)
{
if (isset($file['attribs']) && isset($file['attribs']['name']) &&
$file['attribs']['name']{0} == '.' &&
$file['attribs']['name']{1} == '/') {
$file['attribs']['name'][0] == '.' &&
$file['attribs']['name'][1] == '/') {
// name is something like "./doc/whatever.txt"
$this->_invalidFileName($file['attribs']['name']);
}
@@ -1973,7 +1973,7 @@ class PEAR_PackageFile_v2_Validator
foreach ($methods as $method) {
$function = "$class::$method";
$key = "function;$function";
if ($method{0} == '_' || !strcasecmp($method, $class) ||
if ($method[0] == '_' || !strcasecmp($method, $class) ||
isset($providesret[$key])) {
continue;
}
@@ -1984,7 +1984,7 @@ class PEAR_PackageFile_v2_Validator
foreach ($srcinfo['declared_functions'] as $function) {
$key = "function;$function";
if ($function{0} == '_' || isset($providesret[$key])) {
if ($function[0] == '_' || isset($providesret[$key])) {
continue;
}
if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) {