1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 03:35:38 +03:00
aports/community/baculum/fix-php8.patch
2022-10-24 17:06:11 +00:00

113 lines
3.9 KiB
Diff

--- a/protected/API/Pages/API/ChangerDriveUnload.php
+++ b/protected/API/Pages/API/ChangerDriveUnload.php
@@ -52,7 +52,7 @@
if (is_null($drive)) {
$this->output = DeviceError::MSG_ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST;
- $this->error = DeviceError::ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST
+ $this->error = DeviceError::ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST;
return;
}
--- a/protected/API/Pages/API/ChangerDriveLoaded.php
+++ b/protected/API/Pages/API/ChangerDriveLoaded.php
@@ -38,8 +38,8 @@
$drive = $this->Request->contains('drive') && $misc->isValidName($this->Request['drive']) ? $this->Request['drive'] : null;
if (is_null($drive)) {
- $this->output = DeviceError::MSG_ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST
- $this->error = DeviceError::ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST
+ $this->output = DeviceError::MSG_ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST;
+ $this->error = DeviceError::ERROR_DEVICE_AUTOCHANGER_DRIVE_DOES_NOT_EXIST;
return;
}
--- a/protected/vendor/pradosoft/prado/framework/I18N/core/NumberFormat.php
+++ b/protected/vendor/pradosoft/prado/framework/I18N/core/NumberFormat.php
@@ -199,7 +199,7 @@
if (is_int($groupSize[0])) {
//now for the integer groupings
for ($i = 0; $i < $len; $i++) {
- $char = $string{$len - $i - 1};
+ $char = $string[$len - $i - 1];
if ($multiGroup && $count == 0) {
if ($i != 0 && $i % $groupSize[0] == 0) {
--- a/protected/vendor/pradosoft/prado/framework/I18N/core/NumberFormatInfo.php
+++ b/protected/vendor/pradosoft/prado/framework/I18N/core/NumberFormatInfo.php
@@ -295,7 +295,7 @@
//no decimal point, so traverse from the back
//to find the groupsize 1.
for ($i = strlen($pattern) - 1; $i >= 0; $i--) {
- if ($pattern{$i} == $digit || $pattern{$i} == $hash) {
+ if ($pattern[$i] == $digit || $pattern[$i] == $hash) {
$groupSize1 = $i - $groupPos1;
break;
}
@@ -310,10 +310,10 @@
if (is_int($decimalPos)) {
for ($i = strlen($pattern) - 1; $i >= 0; $i--) {
- if ($pattern{$i} == $dot) {
+ if ($pattern[$i] == $dot) {
break;
}
- if ($pattern{$i} == $digit) {
+ if ($pattern[$i] == $digit) {
$decimalPoints = $i - $decimalPos;
break;
}
--- a/protected/vendor/pradosoft/prado/framework/I18N/core/DateFormat.php
+++ b/protected/vendor/pradosoft/prado/framework/I18N/core/DateFormat.php
@@ -135,8 +135,8 @@
for ($i = 0, $k = count($tokens); $i < $k; ++$i) {
$pattern = $tokens[$i];
- if ($pattern{0} == "'"
- && $pattern{strlen($pattern) - 1} == "'") {
+ if ($pattern[0] == "'"
+ && $pattern[strlen($pattern) - 1] == "'") {
$sub = preg_replace('/(^\')|(\'$)/', '', $pattern);
$tokens[$i] = str_replace('``````', '\'', $sub);
} elseif ($pattern == '``````') {
@@ -166,8 +166,8 @@
*/
protected function getFunctionName($token)
{
- if (isset($this->tokens[$token{0}])) {
- return $this->tokens[$token{0}];
+ if (isset($this->tokens[$token[0]])) {
+ return $this->tokens[$token[0]];
}
}
@@ -284,22 +284,22 @@
$pattern = preg_replace("/''/", '``````', $pattern);
for ($i = 0; $i < strlen($pattern); $i++) {
- if ($char == null || $pattern{$i} == $char || $text) {
- $token .= $pattern{$i};
+ if ($char == null || $pattern[$i] == $char || $text) {
+ $token .= $pattern[$i];
} else {
$tokens[] = str_replace("", "'", $token);
- $token = $pattern{$i};
+ $token = $pattern[$i];
}
- if ($pattern{$i} == "'" && $text == false) {
+ if ($pattern[$i] == "'" && $text == false) {
$text = true;
- } elseif ($text && $pattern{$i} == "'" && $char == "'") {
+ } elseif ($text && $pattern[$i] == "'" && $char == "'") {
$text = true;
- } elseif ($text && $char != "'" && $pattern{$i} == "'") {
+ } elseif ($text && $char != "'" && $pattern[$i] == "'") {
$text = false;
}
- $char = $pattern{$i};
+ $char = $pattern[$i];
}
$tokens[] = $token;
return $tokens;