Skip to content

Commit 4ab43ab

Browse files
author
Stanislav Idolov
authored
ENGCOM-2851: [Forwardport] Replace strval() function by using direct type casting to (string) #17726
2 parents 795e337 + 7ab7f5a commit 4ab43ab

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,6 +2528,7 @@
25282528
['_isAttributeValueEmpty', 'Magento\Catalog\Model\ResourceModel\AbstractResource'],
25292529
['var_dump', ''],
25302530
['each', ''],
2531+
['strval', ''],
25312532
['create_function', ''],
25322533
['configure', 'Magento\Framework\MessageQueue\BatchConsumer'],
25332534
[

lib/internal/Magento/Framework/DB/Select/OrderRenderer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ public function render(Select $select, $sql = '')
4040
$order = [];
4141
foreach ($select->getPart(Select::ORDER) as $term) {
4242
if (is_array($term)) {
43-
if (is_numeric($term[0]) && (string)intval($term[0]) == $term[0]) {
43+
if (is_numeric($term[0]) && (string)(int)$term[0] == $term[0]) {
4444
$order[] = (int)trim($term[0]) . ' ' . $term[1];
4545
} else {
4646
$order[] = $this->quote->quoteIdentifier($term[0]) . ' ' . $term[1];
4747
}
48-
} elseif (is_numeric($term) && (string)intval($term) == $term) {
48+
} elseif (is_numeric($term) && (string)(int)$term == $term) {
4949
$order[] = (int)trim($term);
5050
} else {
5151
$order[] = $this->quote->quoteIdentifier($term);

lib/internal/Magento/Framework/Filter/Translit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $
409409
$convertConfig = $config->getValue('url/convert', 'default');
410410
if ($convertConfig) {
411411
foreach ($convertConfig as $configValue) {
412-
$this->convertTable[(string)$configValue['from']] = strval($configValue['to']);
412+
$this->convertTable[(string)$configValue['from']] = (string)$configValue['to'];
413413
}
414414
}
415415
}

0 commit comments

Comments
 (0)