Code Modernization: Call PHP 5 constructors in methods extending POMO_Reader.

Follow-up to [46629].

See #48252.

git-svn-id: https://develop.svn.wordpress.org/trunk@46632 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-11-02 20:47:44 +00:00
parent 74795ca384
commit 358364e1ca

View File

@ -149,7 +149,7 @@ if ( ! class_exists( 'POMO_FileReader', false ) ) :
* @param string $filename
*/
function __construct( $filename ) {
parent::POMO_Reader();
parent::__construct();
$this->_f = fopen( $filename, 'rb' );
}
@ -232,7 +232,7 @@ if ( ! class_exists( 'POMO_StringReader', false ) ) :
* PHP5 constructor.
*/
function __construct( $str = '' ) {
parent::POMO_Reader();
parent::__construct();
$this->_str = $str;
$this->_pos = 0;
}
@ -300,7 +300,7 @@ if ( ! class_exists( 'POMO_CachedFileReader', false ) ) :
* PHP5 constructor.
*/
function __construct( $filename ) {
parent::POMO_StringReader();
parent::__construct();
$this->_str = file_get_contents( $filename );
if ( false === $this->_str ) {
return false;
@ -331,7 +331,7 @@ if ( ! class_exists( 'POMO_CachedIntFileReader', false ) ) :
* PHP5 constructor.
*/
public function __construct( $filename ) {
parent::POMO_CachedFileReader( $filename );
parent::__construct( $filename );
}
/**