General: Backport PHP 7.1 fixes to the 4.4 branch to avoid fatal errors and warnings.

See #41135


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@41129 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2017-07-24 22:26:59 +00:00
parent 243ca779d0
commit 8590c4a36e
3 changed files with 6 additions and 1 deletions

View File

@ -197,6 +197,7 @@ class WP_oEmbed {
* @return false|string False on failure, otherwise the oEmbed provider URL.
*/
public function get_provider( $url, $args = '' ) {
$args = wp_parse_args( $args );
$provider = false;
@ -284,6 +285,8 @@ class WP_oEmbed {
* @return false|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed.
*/
public function get_html( $url, $args = '' ) {
$args = wp_parse_args( $args );
/**
* Filters the oEmbed result before any HTTP requests are made.
*

View File

@ -27,6 +27,8 @@
*/
function wp_signon( $credentials = array(), $secure_cookie = '' ) {
if ( empty($credentials) ) {
$credentials = array(); // Back-compat for plugins passing an empty string.
if ( ! empty($_POST['log']) )
$credentials['user_login'] = $_POST['log'];
if ( ! empty($_POST['pwd']) )

View File

@ -772,7 +772,7 @@ default:
$reauth = empty($_REQUEST['reauth']) ? false : true;
$user = wp_signon( '', $secure_cookie );
$user = wp_signon( array(), $secure_cookie );
if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) {
if ( headers_sent() ) {