Commit 709e8482 authored by André Matheus Pedrosa's avatar André Matheus Pedrosa Committed by Jonathan Sacksick
Browse files

Issue #3277096 by andregp, matheusmaciel, elber: Deprecated function:...

Issue #3277096 by andregp, matheusmaciel, elber: Deprecated function: mb_substr(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\commerce_paypal\CheckoutSdk.
parent 8709d976
Loading
Loading
Loading
Loading
+3 −3
Changes for src/CheckoutSdk.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -368,7 +368,7 @@ class CheckoutSdk implements CheckoutSdkInterface {
        ],
      ],
      'application_context' => [
        'brand_name' => mb_substr($order->getStore()->label(), 0, 127),
        'brand_name' => mb_substr($order->getStore()->label() ?? '', 0, 127),
      ],
    ];

@@ -461,9 +461,9 @@ class CheckoutSdk implements CheckoutSdkInterface {
      'address' => [
        'address_line_1' => $address->getAddressLine1(),
        'address_line_2' => $address->getAddressLine2(),
        'admin_area_2' => mb_substr($address->getLocality(), 0, 120),
        'admin_area_2' => mb_substr($address->getLocality() ?? '', 0, 120),
        'admin_area_1' => $address->getAdministrativeArea(),
        'postal_code' => mb_substr($address->getPostalCode(), 0, 60),
        'postal_code' => mb_substr($address->getPostalCode() ?? '', 0, 60),
        'country_code' => $address->getCountryCode(),
      ],
    ];