-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove internal usage of SplFileInfo::_bad_state_ex() method
Use standard VM handling instead Deprecate the method
- Loading branch information
Showing
5 changed files
with
52 additions
and
8 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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,41 @@ | ||
--TEST-- | ||
GH-8318 (SplFileObject useless call to an internal method for erroring) | ||
--FILE-- | ||
<?php | ||
class bug8318 extends \SplFileObject | ||
{ | ||
public function __construct() | ||
{ | ||
} | ||
|
||
public function fpassthru(): int | ||
{ | ||
return 0; | ||
} | ||
} | ||
|
||
$cl = new bug8318; | ||
try { | ||
$cl->fpassthru(); | ||
} catch (\Error $e) { | ||
var_dump($e); | ||
} | ||
?> | ||
--EXPECTF-- | ||
object(Error)#2 (7) { | ||
["message":protected]=> | ||
string(72) "The parent constructor was not called: the object is in an invalid state" | ||
["string":"Error":private]=> | ||
string(0) "" | ||
["code":protected]=> | ||
int(0) | ||
["file":protected]=> | ||
string(50) "%s" | ||
["line":protected]=> | ||
int(16) | ||
["trace":"Error":private]=> | ||
array(0) { | ||
} | ||
["previous":"Error":private]=> | ||
NULL | ||
} |