Skip to content

Commit 884bfa5

Browse files
DanielSiepmannondrejmirtes
authored andcommitted
Fix wrong return type for SplFileObject::fgets()
The method does not return false, in contrast to function fgets(). The method will throw an exception instead. Resolves: #11091
1 parent fc0567e commit 884bfa5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/functionMap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11579,7 +11579,7 @@
1157911579
'SplFileObject::fgetc' => ['string|false'],
1158011580
// Do not believe https://www.php.net/manual/en/splfileobject.fgetcsv#refsect1-splfileobject.fgetcsv-returnvalues
1158111581
'SplFileObject::fgetcsv' => ['list<string>|array{0: null}|false|null', 'delimiter='=>'string', 'enclosure='=>'string', 'escape='=>'string'],
11582-
'SplFileObject::fgets' => ['string|false'],
11582+
'SplFileObject::fgets' => ['string'],
1158311583
'SplFileObject::fgetss' => ['string|false', 'allowable_tags='=>'string'],
1158411584
'SplFileObject::flock' => ['bool', 'operation'=>'int', '&w_wouldblock='=>'int'],
1158511585
'SplFileObject::fpassthru' => ['int'],
@@ -11593,7 +11593,7 @@
1159311593
'SplFileObject::fwrite' => ['int', 'str'=>'string', 'length='=>'int'],
1159411594
'SplFileObject::getChildren' => ['null'],
1159511595
'SplFileObject::getCsvControl' => ['array'],
11596-
'SplFileObject::getCurrentLine' => ['string|false'],
11596+
'SplFileObject::getCurrentLine' => ['string'],
1159711597
'SplFileObject::getFlags' => ['int'],
1159811598
'SplFileObject::getMaxLineLen' => ['int'],
1159911599
'SplFileObject::hasChildren' => ['false'],

0 commit comments

Comments
 (0)