Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2010
    Posts
    264
    Plugin Contributions
    1

    Default PHP Warning: array_merge(): Expected parameter 1 to be an array

    [Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here.
    And, remove this comment before actually posting!]

    redsautorehab.com
    php 7.4

    I upgraded my site last week, and was getting no errors. I just checked today, and my log folder is full, and I have no clue what happened. If I upgrade to php 8.0, or 8.1, I get a white screen, and the same php warning is a fatal error.

    [27-Dec-2022 10:14:52 America/Boise] Request URI: /newzen/, IP address: 71.223.114.232
    #1 array_merge() called at [/home1/redsauto/public_html/newzen/includes/classes/ResourceLoaders/ArraysLanguageLoader.php:67]
    #2 Zencart\LanguageLoader\ArraysLanguageLoader->processArrayFileList() called at [/home1/redsauto/public_html/newzen/includes/classes/ResourceLoaders/ArraysLanguageLoader.php:47]
    #3 Zencart\LanguageLoader\ArraysLanguageLoader->loadArraysFromDirectory() called at [/home1/redsauto/public_html/newzen/includes/classes/ResourceLoaders/CatalogArraysLanguageLoader.php:50]
    #4 Zencart\LanguageLoader\CatalogArraysLanguageLoader->loadLanguageExtraDefinitions() called at [/home1/redsauto/public_html/newzen/includes/classes/ResourceLoaders/CatalogArraysLanguageLoader.php:19]
    #5 Zencart\LanguageLoader\CatalogArraysLanguageLoader->loadInitialLanguageDefines() called at [/home1/redsauto/public_html/newzen/includes/classes/ResourceLoaders/LanguageLoader.php:28]
    #6 Zencart\LanguageLoader\LanguageLoader->loadInitialLanguageDefines() called at [/home1/redsauto/public_html/newzen/includes/init_includes/init_templates.php:87]
    #7 require_once(/home1/redsauto/public_html/newzen/includes/init_includes/init_templates.php) called at [/home1/redsauto/public_html/newzen/includes/autoload_func.php:40]
    #8 require(/home1/redsauto/public_html/newzen/includes/autoload_func.php) called at [/home1/redsauto/public_html/newzen/includes/application_top.php:237]
    #9 require(/home1/redsauto/public_html/newzen/includes/application_top.php) called at [/home1/redsauto/public_html/newzen/index.php:25]
    --> PHP Warning: array_merge(): Expected parameter 2 to be an array, int given in /home1/redsauto/public_html/newzen/includes/classes/ResourceLoaders/ArraysLanguageLoader.php on line 67.

    [27-Dec-2022 10:14:52 America/Boise] Request URI: /newzen/, IP address: 71.223.114.232
    #1 array_merge() called at [/home1/redsauto/public_html/newzen/includes/classes/ResourceLoaders/ArraysLanguageLoader.php:67]
    #2 Zencart\LanguageLoader\ArraysLanguageLoader->processArrayFileList() called at [/home1/redsauto/public_html/newzen/includes/classes/ResourceLoaders/ArraysLanguageLoader.php:47]
    #3 Zencart\LanguageLoader\ArraysLanguageLoader->loadArraysFromDirectory() called at [/home1/redsauto/public_html/newzen/includes/classes/ResourceLoaders/CatalogArraysLanguageLoader.php:50]
    #4 Zencart\LanguageLoader\CatalogArraysLanguageLoader->loadLanguageExtraDefinitions() called at [/home1/redsauto/public_html/newzen/includes/classes/ResourceLoaders/CatalogArraysLanguageLoader.php:19]
    #5 Zencart\LanguageLoader\CatalogArraysLanguageLoader->loadInitialLanguageDefines() called at [/home1/redsauto/public_html/newzen/includes/classes/ResourceLoaders/LanguageLoader.php:28]
    #6 Zencart\LanguageLoader\LanguageLoader->loadInitialLanguageDefines() called at [/home1/redsauto/public_html/newzen/includes/init_includes/init_templates.php:87]
    #7 require_once(/home1/redsauto/public_html/newzen/includes/init_includes/init_templates.php) called at [/home1/redsauto/public_html/newzen/includes/autoload_func.php:40]
    #8 require(/home1/redsauto/public_html/newzen/includes/autoload_func.php) called at [/home1/redsauto/public_html/newzen/includes/application_top.php:237]
    #9 require(/home1/redsauto/public_html/newzen/includes/application_top.php) called at [/home1/redsauto/public_html/newzen/index.php:25]
    --> PHP Warning: array_merge(): Expected parameter 1 to be an array, null given in /home1/redsauto/public_html/newzen/includes/classes/ResourceLoaders/ArraysLanguageLoader.php on line 67.
    I have not modified that file at all. Any suggestions on where to start?

  2. #2
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: PHP Warning: array_merge(): Expected parameter 1 to be an array

    Are you sure ALL of your language files have been converted to the 1.5.8 array format? If not, @torvista created a great tool to help you get started, but keep in mind it's not to be used on a production site!

  3. #3
    Join Date
    Apr 2010
    Posts
    264
    Plugin Contributions
    1

    Default Re: PHP Warning: array_merge(): Expected parameter 1 to be an array

    Quote Originally Posted by balihr View Post
    Are you sure ALL of your language files have been converted to the 1.5.8 array format? If not, @torvista created a great tool to help you get started, but keep in mind it's not to be used on a production site!
    Thank you. I added a page in the past for warranty information, and included a link to it. I did rename the files to lang.warranty_information.php but was unaware of the new format. I modified the language files for that to the new format, and no longer have that issue.

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,671
    Plugin Contributions
    123

    Default Re: PHP Warning: array_merge(): Expected parameter 1 to be an array

    Glad you solved your issue. Yes, there's more to the new format than simply renaming, as you discovered!
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. Replies: 11
    Last Post: 21 Dec 2018, 09:06 PM
  2. v154 PHP Warning: extract() expects parameter 1 to be array
    By JoeH in forum General Questions
    Replies: 2
    Last Post: 15 May 2018, 06:44 PM
  3. PHP Warning: addslashes() expects parameter 1 to be string, array given
    By schoolboy in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 10 May 2013, 02:19 PM
  4. Warning: array_merge() [function.array-merge]: Argument #1 is not an array
    By antieuclid in forum PayPal Express Checkout support
    Replies: 3
    Last Post: 19 Jul 2010, 02:50 AM
  5. Replies: 19
    Last Post: 14 Dec 2009, 01:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR