-
-
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.
[Php81] Handle crash on Crypt() single arg on NullToStrictStringFuncC…
…allArgRector (#2767)
- Loading branch information
1 parent
128cc91
commit 933eb13
Showing
2 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...s/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector/Fixture/crypt_one_arg.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,37 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\FuncCall\NullToStrictStringFuncCallArgRector\Fixture; | ||
|
||
/** | ||
* Crypt requires 2 args since php 5.6, when it only fill 1st arg, it will only change 1st arg | ||
* | ||
* Note: Filling 2nd arg will require different Rule to match the salt algorithm. | ||
*/ | ||
final class CryptOneArg | ||
{ | ||
public function run($subject) | ||
{ | ||
crypt($subject); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\FuncCall\NullToStrictStringFuncCallArgRector\Fixture; | ||
|
||
/** | ||
* Crypt requires 2 args since php 5.6, when it only fill 1st arg, it will only change 1st arg | ||
* | ||
* Note: Filling 2nd arg will require different Rule to match the salt algorithm. | ||
*/ | ||
final class CryptOneArg | ||
{ | ||
public function run($subject) | ||
{ | ||
crypt((string) $subject); | ||
} | ||
} | ||
|
||
?> |
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