Skip to content

php fatal error on mage2pro/stripe/block/Multishipping#L235 ,'phone' => df_phone_format_clean($a, false) #76

@graham-haworth

Description

@graham-haworth

Since magento 2.3 feature added in Customer Configuration | Name and Address Options

  • Show Telephone, Show Company can be set to No
    If this is the case when you hit billing stage in multi shipping get a php fatal error returned if pass null value for phone number into here.
    Stripe api string is optional, so just need to honour this case when a number is null / no set.

==> /var/log/php7.1-fpm.log <==
[15-Feb-2019 00:47:43] WARNING: [pool www] child 2195 said into stderr: "NOTICE: PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to libphonenumber\PhoneNumberUtil::format() must be an instance of libphonenumber\PhoneNumber, boolean given, called in /var/www/magento/vendor/mage2pro/phone/lib/main.php on line 65 and defined in /var/www/magento/vendor/giggsey/libphonenumber-for-php/src/PhoneNumberUtil.php:1137"
[15-Feb-2019 00:47:43] WARNING: [pool www] child 2195 said into stderr: "Stack trace:"
[15-Feb-2019 00:47:43] WARNING: [pool www] child 2195 said into stderr: "#0 /var/www/magento/vendor/mage2pro/phone/lib/main.php(65): libphonenumber\PhoneNumberUtil->format(false, 0)"
[15-Feb-2019 00:47:43] WARNING: [pool www] child 2195 said into stderr: "#1 /var/www/magento/vendor/mage2pro/phone/lib/main.php(77): df_phone_format(Object(Magento\Quote\Model\Quote\Address\Interceptor), false, 0)"
[15-Feb-2019 00:47:43] WARNING: [pool www] child 2195 said into stderr: "#2 /var/www/magento/vendor/mage2pro/stripe/Block/Multishipping.php(236): df_phone_format_clean(Object(Magento\Quote\Model\Quote\Address\Interceptor), false)"
[15-Feb-2019 00:47:43] WARNING: [pool www] child 2195 said into stderr: "#3 /var/www/magento/vendor/mage2pro/stripe/Block/Multishipping.php(60): Dfe\Stripe\Block\Multishipping->sourceData(Object(Magento\Quote\Model\Quote\Address\Interceptor))"
[15-Feb-2019 00:47:43] WARNING: [pool www] child 2195 said into stderr: "#4 /var/www/magento/vendor/magento/framework/View/Element/AbstractBlock..."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions