Skip to content

Commit 6172b66

Browse files
committed
Code Modernization: Avoid returning values in constructors.
Returning values from `__construct()` and `__destruct()` is a deprecated practice starting with PHP 8.6, as per [https://wiki.php.net/rfc/deprecate-return-value-from-construct a recent RFC]. Props iamchitti, Soean. Fixes #65637. git-svn-id: https://develop.svn.wordpress.org/trunk@62765 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 7a4fd81 commit 6172b66

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/wp-includes/class-pop3.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ function __construct ( $server = '', $timeout = '' ) {
6464
set_time_limit($timeout);
6565
}
6666
}
67-
return true;
6867
}
6968

7069
/**

src/wp-includes/pomo/streams.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ public function __construct( $filename ) {
314314
parent::__construct();
315315
$this->_str = file_get_contents( $filename );
316316
if ( false === $this->_str ) {
317-
return false;
317+
return;
318318
}
319319
$this->_pos = 0;
320320
}

0 commit comments

Comments
 (0)