-
-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NodeTypeResolver] Handle crash after next exit() on no namespaced co…
…de after removal next attribute (#4074)
- Loading branch information
1 parent
8e80c7a
commit dab4482
Showing
4 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...ests/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector/Fixture/after_exit.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
// no namespace on purpose to cover crash on FileWithoutNamespace | ||
exit(); | ||
|
||
// this part is needed to produce crash | ||
echo 'some statement'; | ||
|
||
function run2() | ||
{ | ||
preg_split('#a#', null); | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
// no namespace on purpose to cover crash on FileWithoutNamespace | ||
exit(); | ||
|
||
// this part is needed to produce crash | ||
echo 'some statement'; | ||
|
||
function run2() | ||
{ | ||
preg_split('#a#', ''); | ||
} | ||
|
||
?> |
29 changes: 29 additions & 0 deletions
29
...Rector/FuncCall/NullToStrictStringFuncCallArgRector/Fixture/after_exit_namespaced.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\FuncCall\NullToStrictStringFuncCallArgRector\Fixture; | ||
|
||
exit(); | ||
|
||
echo 'some statement'; | ||
|
||
function run2() | ||
{ | ||
preg_split('#a#', null); | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\FuncCall\NullToStrictStringFuncCallArgRector\Fixture; | ||
|
||
exit(); | ||
|
||
echo 'some statement'; | ||
|
||
function run2() | ||
{ | ||
preg_split('#a#', ''); | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters