Browse Source

descontinuado acessar array por chaves -> deprecate_curly_braces_array_access

1.9
bruno 1 year ago
parent
commit
1180c73a83
  1. 2
      asterisk/var_lib_asterisk/scripts/tarifador/php_serial.class.php
  2. 2
      include/Console/Getopt.php
  3. 2
      include/PHPExcel/Calculation/Engineering.php
  4. 2
      include/PHPExcel/Calculation/FormulaParser.php
  5. 4
      include/PHPExcel/Calculation/Functions.php
  6. 26
      include/PHPExcel/Calculation/TextData.php
  7. 14
      include/PHPExcel/Cell.php
  8. 4
      include/PHPExcel/Reader/Excel2003XML.php
  9. 2
      include/PHPExcel/Reader/Excel5.php
  10. 8
      include/PHPExcel/Reader/Excel5/Escher.php
  11. 2
      include/PHPExcel/Reader/SYLK.php
  12. 4
      include/PHPExcel/ReferenceHelper.php
  13. 2
      include/PHPExcel/Worksheet/AutoFilter.php

2
asterisk/var_lib_asterisk/scripts/tarifador/php_serial.class.php

@ -237,7 +237,7 @@ class phpSerial {
if ($this->_os === "linux") {
$ret = $this->_exec("stty -F " . $this->_device . " " . $args[$parity], $out);
} else {
$ret = $this->_exec("mode " . $this->_windevice . " PARITY=" . $parity{0}, $out);
$ret = $this->_exec("mode " . $this->_windevice . " PARITY=" . $parity[0], $out );
}
if ($ret === 0) {

2
include/Console/Getopt.php

@ -103,7 +103,7 @@ class Console_Getopt {
* erroneous POSIX fix.
*/
if ($version < 2) {
if (isset($args[0]{0}) && $args[0]{0} != '-') {
if (isset($args[0][0]) && $args[0][0] != '-') {
array_shift($args);
}
}

2
include/PHPExcel/Calculation/Engineering.php

@ -768,7 +768,7 @@ class PHPExcel_Calculation_Engineering
// Split the input into its Real and Imaginary components
$leadingSign = 0;
if (strlen($workString) > 0) {
$leadingSign = (($workString{0} == '+') || ($workString{0} == '-')) ? 1 : 0;
$leadingSign = (($workString[0] == '+') || ($workString[0] == '-')) ? 1 : 0;
}
$power = '';
$realNumber = strtok($workString, '+-');

2
include/PHPExcel/Calculation/FormulaParser.php

@ -159,7 +159,7 @@ class PHPExcel_Calculation_FormulaParser
// Check if the formula has a valid starting =
$formulaLength = strlen($this->formula);
if ($formulaLength < 2 || $this->formula{0} != '=') {
if ($formulaLength < 2 || $this->formula[0] != '=') {
return;
}

4
include/PHPExcel/Calculation/Functions.php

@ -318,10 +318,10 @@ class PHPExcel_Calculation_Functions
public static function ifCondition($condition)
{
$condition = PHPExcel_Calculation_Functions::flattenSingleValue($condition);
if (!isset($condition{0})) {
if (!isset($condition[0])) {
$condition = '=""';
}
if (!in_array($condition{0}, array('>', '<', '='))) {
if (!in_array($condition[0], array('>', '<', '='))) {
if (!is_numeric($condition)) {
$condition = PHPExcel_Calculation::wrapResult(strtoupper($condition));
}

26
include/PHPExcel/Calculation/TextData.php

@ -40,19 +40,19 @@ class PHPExcel_Calculation_TextData
private static function unicodeToOrd($c)
{
if (ord($c{0}) >=0 && ord($c{0}) <= 127) {
return ord($c{0});
} elseif (ord($c{0}) >= 192 && ord($c{0}) <= 223) {
return (ord($c{0})-192)*64 + (ord($c{1})-128);
} elseif (ord($c{0}) >= 224 && ord($c{0}) <= 239) {
return (ord($c{0})-224)*4096 + (ord($c{1})-128)*64 + (ord($c{2})-128);
} elseif (ord($c{0}) >= 240 && ord($c{0}) <= 247) {
return (ord($c{0})-240)*262144 + (ord($c{1})-128)*4096 + (ord($c{2})-128)*64 + (ord($c{3})-128);
} elseif (ord($c{0}) >= 248 && ord($c{0}) <= 251) {
return (ord($c{0})-248)*16777216 + (ord($c{1})-128)*262144 + (ord($c{2})-128)*4096 + (ord($c{3})-128)*64 + (ord($c{4})-128);
} elseif (ord($c{0}) >= 252 && ord($c{0}) <= 253) {
return (ord($c{0})-252)*1073741824 + (ord($c{1})-128)*16777216 + (ord($c{2})-128)*262144 + (ord($c{3})-128)*4096 + (ord($c{4})-128)*64 + (ord($c{5})-128);
} elseif (ord($c{0}) >= 254 && ord($c{0}) <= 255) {
if (ord($c[0]) >=0 && ord($c[0]) <= 127) {
return ord($c[0]);
} elseif (ord($c[0]) >= 192 && ord($c[0]) <= 223) {
return (ord($c[0])-192)*64 + (ord($c[1])-128);
} elseif (ord($c[0]) >= 224 && ord($c[0]) <= 239) {
return (ord($c[0])-224)*4096 + (ord($c[1])-128)*64 + (ord($c[2])-128);
} elseif (ord($c[0]) >= 240 && ord($c[0]) <= 247) {
return (ord($c[0])-240)*262144 + (ord($c[1])-128)*4096 + (ord($c[2])-128)*64 + (ord($c[3])-128);
} elseif (ord($c[0]) >= 248 && ord($c[0]) <= 251) {
return (ord($c[0])-248)*16777216 + (ord($c[1])-128)*262144 + (ord($c[2])-128)*4096 + (ord($c[3])-128)*64 + (ord($c[4])-128);
} elseif (ord($c[0]) >= 252 && ord($c[0]) <= 253) {
return (ord($c[0])-252)*1073741824 + (ord($c[1])-128)*16777216 + (ord($c[2])-128)*262144 + (ord($c[3])-128)*4096 + (ord($c[4])-128)*64 + (ord($c[5])-128);
} elseif (ord($c[0]) >= 254 && ord($c[0]) <= 255) {
// error
return PHPExcel_Calculation_Functions::VALUE();
}

14
include/PHPExcel/Cell.php

@ -809,19 +809,19 @@ class PHPExcel_Cell
// We also use the language construct isset() rather than the more costly strlen() function to match the length of $pString
// for improved performance
if (isset($pString{0})) {
if (!isset($pString{1})) {
if (isset($pString[0])) {
if (!isset($pString[1])) {
$_indexCache[$pString] = $_columnLookup[$pString];
return $_indexCache[$pString];
} elseif (!isset($pString{2})) {
$_indexCache[$pString] = $_columnLookup[$pString{0}] * 26 + $_columnLookup[$pString{1}];
} elseif (!isset($pString[2])) {
$_indexCache[$pString] = $_columnLookup[$pString[0] * 26 + $_columnLookup[$pString[1];
return $_indexCache[$pString];
} elseif (!isset($pString{3})) {
$_indexCache[$pString] = $_columnLookup[$pString{0}] * 676 + $_columnLookup[$pString{1}] * 26 + $_columnLookup[$pString{2}];
} elseif (!isset($pString[3])) {
$_indexCache[$pString] = $_columnLookup[$pString[0] * 676 + $_columnLookup[$pString[1] * 26 + $_columnLookup[$pString[2];
return $_indexCache[$pString];
}
}
throw new PHPExcel_Exception("Column string index can not be " . ((isset($pString{0})) ? "longer than 3 characters" : "empty"));
throw new PHPExcel_Exception("Column string index can not be " . ((isset($pString[0])) ? "longer than 3 characters" : "empty"));
}
/**

4
include/PHPExcel/Reader/Excel2003XML.php

@ -689,7 +689,7 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
$rowReference = $rowID;
}
// Bracketed R references are relative to the current row
if ($rowReference{0} == '[') {
if ($rowReference[0] == '[') {
$rowReference = $rowID + trim($rowReference, '[]');
}
$columnReference = $cellReference[4][0];
@ -698,7 +698,7 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P
$columnReference = $columnNumber;
}
// Bracketed C references are relative to the current column
if ($columnReference{0} == '[') {
if ($columnReference[0] == '[') {
$columnReference = $columnNumber + trim($columnReference, '[]');
}
$A1CellReference = PHPExcel_Cell::stringFromColumnIndex($columnReference-1).$rowReference;

2
include/PHPExcel/Reader/Excel5.php

@ -1925,7 +1925,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
// offset: 0; size: 2; 0 = base 1900, 1 = base 1904
PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900);
if (ord($recordData{0}) == 1) {
if (ord($recordData[0]) == 1) {
PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_MAC_1904);
}
}

8
include/PHPExcel/Reader/Excel5/Escher.php

@ -280,16 +280,16 @@ class PHPExcel_Reader_Excel5_Escher
$foDelay = PHPExcel_Reader_Excel5::getInt4d($recordData, 28);
// offset: 32; size: 1; unused1
$unused1 = ord($recordData{32});
$unused1 = ord($recordData[32]);
// offset: 33; size: 1; size of nameData in bytes (including null terminator)
$cbName = ord($recordData{33});
$cbName = ord($recordData[33]);
// offset: 34; size: 1; unused2
$unused2 = ord($recordData{34});
$unused2 = ord($recordData[34]);
// offset: 35; size: 1; unused3
$unused3 = ord($recordData{35});
$unused3 = ord($recordData[35]);
// offset: 36; size: $cbName; nameData
$nameData = substr($recordData, 36, $cbName);

2
include/PHPExcel/Reader/SYLK.php

@ -161,7 +161,7 @@ class PHPExcel_Reader_SYLK extends PHPExcel_Reader_Abstract implements PHPExcel_
if ($dataType == 'C') {
// Read cell value data
foreach ($rowData as $rowDatum) {
switch ($rowDatum{0}) {
switch ($rowDatum[0]) {
case 'C':
case 'X':
$columnIndex = substr($rowDatum, 1) - 1;

4
include/PHPExcel/ReferenceHelper.php

@ -881,8 +881,8 @@ class PHPExcel_ReferenceHelper
list($newColumn, $newRow) = PHPExcel_Cell::coordinateFromString($pCellReference);
// Verify which parts should be updated
$updateColumn = (($newColumn{0} != '$') && ($beforeColumn{0} != '$') && (PHPExcel_Cell::columnIndexFromString($newColumn) >= PHPExcel_Cell::columnIndexFromString($beforeColumn)));
$updateRow = (($newRow{0} != '$') && ($beforeRow{0} != '$') && $newRow >= $beforeRow);
$updateColumn = (($newColumn[0] != '$') && ($beforeColumn[0] != '$') && (PHPExcel_Cell::columnIndexFromString($newColumn) >= PHPExcel_Cell::columnIndexFromString($beforeColumn)));
$updateRow = (($newRow[0] != '$') && ($beforeRow[0] != '$') && $newRow >= $beforeRow);
// Create new column reference
if ($updateColumn) {

2
include/PHPExcel/Worksheet/AutoFilter.php

@ -717,7 +717,7 @@ class PHPExcel_Worksheet_AutoFilter
);
} else {
// Date based
if ($dynamicRuleType{0} == 'M' || $dynamicRuleType{0} == 'Q') {
if ($dynamicRuleType[0] == 'M' || $dynamicRuleType[0] == 'Q') {
// Month or Quarter
sscanf($dynamicRuleType, '%[A-Z]%d', $periodType, $period);
if ($periodType == 'M') {

Loading…
Cancel
Save