Make WordPress Core

Ticket #47751: 47751-External-POP3.patch

File 47751-External-POP3.patch, 1.0 KB (added by jrf, 5 years ago)

[External POP3] PHP 7.4 compatibility: fix deprecated curly brace array access

  • src/wp-includes/class-pop3.php

    From a430cf48185e8e97f1835455acd12c50c63f3b64 Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Mon, 22 Jul 2019 05:16:08 +0200
    Subject: [PATCH] [External POP3] PHP 7.4 compatibility: fix deprecated curly
     brace array access
    
    PHP 7.4 will deprecated array access using curly braces.
    
    Ref: https://wiki.php.net/rfc/deprecate_curly_braces_array_access
    ---
     src/wp-includes/class-pop3.php | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/wp-includes/class-pop3.php b/src/wp-includes/class-pop3.php
    index 7416dd7001..9ad185698e 100644
    a b class POP3 { 
    376376        $line = fgets($fp,$buffer);
    377377        while ( !preg_match('/^\.\r\n/',$line))
    378378        {
    379             if ( $line{0} == '.' ) { $line = substr($line,1); }
     379            if ( $line[0] == '.' ) { $line = substr($line,1); }
    380380            $MsgArray[$count] = $line;
    381381            $count++;
    382382            $line = fgets($fp,$buffer);