Jump to content

Postal Methods Expected parameter 2 to be an array, null given


Anton Qcl

Recommended Posts

Hello.
We found in logs a lot of errors like this in the file general-warning-cron-2021-07-14.log:

[2021-07-14T22:46:17.164596+00:00] general.WARNING: E_WARNING: array_merge(): Expected parameter 1 to be an array, null given {"code":2,"message":"array_merge(): Expected parameter 1 to be an array, null given","file":"/var/www/vhosts/hdzona.tv/public_html/components/delivery/postal_methods/postal_methods.php","line":298}

Looks like system expects that address is set but it is not.
Can you, please, check it from your side? Since the error pops up in the cron log we are not able to determine which exactly action cause it.
Let me know if you need any additional information.

Blesta: 5.1.0
PHP: 7.4
OS: centos-release-7-9.2009.1.el7.centos.x86_64

Link to comment
Share on other sites

Solution:

 

In components/invoice_delivery/invoice_delivery.php around line 745 add a few more lines
            'postalmethods_apikey',
            'postalmethods_colored',
            'postalmethods_return_address1',
            'postalmethods_return_address2',
            'postalmethods_return_city',
            'postalmethods_return_state',
            'postalmethods_return_zip',
            'postalmethods_return_country',
            'postalmethods_replyenvelope',
            'postalmethods_doublesided',

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...