mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-21 22:32:41 +01:00
Fix $boot_length comparison in PhagePHPAgentBootloader
Summary: `$boot_length = strlen($boot_sequence->toString())` returns an `int` and `strlen()` expects a `string` as a parameter. Thus calling `if (strlen($boot_length) > 8192)` afterwards to get the string length of an integer makes no sense. Test Plan: Read the code. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25770
This commit is contained in:
parent
06028fad3c
commit
4752567130
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ final class PhagePHPAgentBootloader extends PhageAgentBootloader {
|
|||
$boot_length = strlen($boot_sequence->toString());
|
||||
$boot_sequence->addText($main_sequence->toString());
|
||||
|
||||
if (strlen($boot_length) > 8192) {
|
||||
if ($boot_length > 8192) {
|
||||
throw new Exception(pht('Stage 1 bootloader is too large!'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue