• Ebenfalls zusammen mit WC Global Cart wird auf ein Null-Wert zugegriffen:

    PHP Notice:  Trying to access array offset on value of type null in /----/wordpress/wp-content/plugins/swiss-qr-bill/includes/gateway/abstract-wc-gateway-swiss-qr-bill.php on line 285
    

    Patch:

    
    

    Index: includes/gateway/abstract-wc-gateway-swiss-qr-bill.php
    ===================================================================
    — includes/gateway/abstract-wc-gateway-swiss-qr-bill.php (revision 2747982)
    +++ includes/gateway/abstract-wc-gateway-swiss-qr-bill.php (working copy)
    @@ -282,7 +282,7 @@
    * @return bool
    */
    public function is_valid_billing_country() {
    – return WC()->session && in_array(strtoupper(WC()->session->get(‘customer’)[‘country’]), array(‘CH’, ‘LI’));
    + return WC()->session && WC()->session->get(‘customer’) && in_array(strtoupper(WC()->session->get(‘customer’)[‘country’]), array(‘CH’, ‘LI’));
    }

    /**`

    `

Viewing 1 replies (of 1 total)
  • Ich erhalte ebenfalls folgenden Fehler:
    Warning: Trying to access array offset on value of type null in …/wp-content/plugins/swiss-qr-bill/includes/gateway/abstract-wc-gateway-swiss-qr-bill.php on line 285 Warning: Trying to access array offset on value of type null in /…/wp-content/plugins/swiss-qr-bill/includes/gateway/abstract-wc-gateway-swiss-qr-bill.php on line 285

    Was muss ich mit dem obigen Patch machen? Muss dieser Code in function.php eingefügt werden?

Viewing 1 replies (of 1 total)
  • The topic ‘access array offset on null in abstract-wc-gateway-swiss-qr-bill.php on line 285’ is closed to new replies.