Skip to content

Commit bcf50f4

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into vsprintf
2 parents 1217351 + fa8830c commit bcf50f4

File tree

6 files changed

+723
-394
lines changed

6 files changed

+723
-394
lines changed

.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
16+
php-versions: ['7.2', '7.3', '7.4']
1717
name: Tests with PHP ${{ matrix.php-versions }}
1818

1919
steps:

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

Magento2/Sniffs/Security/XssTemplateSniff.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,10 @@ private function parseLineStatement($start, $end)
249249
$posOfLastInlineThen = $this->findLastInScope(T_INLINE_THEN, $start, $end);
250250
if ($posOfLastInlineThen !== false) {
251251
$posOfInlineElse = $this->file->findNext(T_INLINE_ELSE, $posOfLastInlineThen, $end);
252-
$this->addStatement($posOfLastInlineThen + 1, $posOfInlineElse);
253-
$this->addStatement($posOfInlineElse + 1, $end);
252+
if ($posOfInlineElse !== false) {
253+
$this->addStatement($posOfLastInlineThen + 1, $posOfInlineElse);
254+
$this->addStatement($posOfInlineElse + 1, $end);
255+
}
254256
$parsed = true;
255257
} else {
256258
do {

Magento2/Tests/Security/XssTemplateUnitTest.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,6 @@ echo $var;
5757
<?php echo $block->escapeCss($css); ?>
5858
<?php echo $block->getJsLayout($jsLayout); ?>
5959
<?= /* @noEscape */ json_encode($config) ?>
60+
61+
<!-- intentional parse error -->
62+
<?= $block->escapeUrl($block->getUrl('no-route')) <?= $block->getBaseUrl() ?>

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"type": "phpcodesniffer-standard",
99
"version": "6",
1010
"require": {
11-
"php": ">=5.6.0",
11+
"php": ">=7.2",
1212
"squizlabs/php_codesniffer": "^3.5",
13-
"webonyx/graphql-php": ">=0.12.6 <1.0"
13+
"webonyx/graphql-php": "^14.9"
1414
},
1515
"require-dev": {
16-
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
16+
"phpunit/phpunit": "^7.0"
1717
},
1818
"autoload": {
1919
"classmap": [

0 commit comments

Comments
 (0)