ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Argument #1 is not an array error

February 15, 2012 1:27am

Subscribe [3]
  • #1 / Feb 15, 2012 1:27am

    Brian_az

    36 posts

    Hello,

    I am trying to link rental suites to buildings. I have buildings set up as a channel, and suites as another. I set the suite related the the buildng entry. I use image manipulation to resize the uploads for thumbs.

    When I call the page for the building to list the suites, I see the building at the top, then the 2 suites I have checked in below. Each suite can have up to 5 photos. I am getting an error when one suite has 3 thumbs and an other has less. The page works fine, I just get the error:


    A PHP Error was encountered
    Severity: Warning
    Message: array_merge() [function.array-merge]: Argument #1 is not an array
    Filename: libraries/Functions.php
    Line Number: 2585

    A PHP Error was encountered
    Severity: Warning
    Message: Cannot modify header information - headers already sent by (output started at /var/www/virtual/mydomain.com/system/codeigniter/system/core/Exceptions.php:170)
    Filename: core/Common.php
    Line Number: 409


    Heres is the code I am using:

    {exp:channel:entries channel="Buildings" limit="1"}
    <h3>{title}</h3>
    
    <p>{city}, {state}, {zip_code}</p>
    
    <p>Total spaces available: {total_spaces_available}</p>
    
    <p>Property type: {property_type}</p>
    
    <p>Property sub type: {property_sub_type}</p>
    
    <p>Building size: {building_size} sq. ft.</p>
    
    <p>Building class: {building_class}</p>
    
    <p><br />
    {description}</p>
    
    <p><br />
    {reverse_related_entries sort="desc" orderby="date"}<br /></p><h3>{title}</h3>
    
    <p> Space available: {space_available}</p>
    
    <p> Rate per month: {rental_rate_per_month}</p>
    
    <p> Space type: {space_type}</p>
    
    <p> <strong>Description:</strong></p>
    
    <p> {suite_description}</p>
    
    <p> </p>
    
    <p><br />
     {attachment_1}</p>
    
    <p> {attachment_2}</p>
    
    <p><br />
    {photo_1}{path}_suitethumb/{filename}.{extension}{/photo_1}<br />
    {photo_2}{path}_suitethumb/{filename}.{extension}{/photo_2}<br />
    {if photo_3}{photo_3}{path}_suitethumb/{filename}.{extension}{/photo_3}{/if}</p>
    
    <p>{/reverse_related_entries}</p>
    
    <p>{/exp:channel:entries}


    Any ideas?  I think I can use Playa, but would prefer to just use it this way without the warnings 😉

    Thanks!

  • #2 / Feb 16, 2012 11:14am

    Shane Eckert

    7174 posts

    Hello,

    I am sorry to hear you are running into this problem.

    What version of ExpressionEngine are you running?

    This sounds like a known bug reported on 2.4.0. The bug includes a temporary fix as well, but this may or may not apply to you.

    Please let me know your version and we can go from there.

    Cheers,

  • #3 / Feb 16, 2012 11:27am

    Brian_az

    36 posts

    Thanks, that fixed it, you rock!

    Im using 2.4

    This code fixed it:

    Open system/expressionengine/fieldtypes/file/ft.file.php and find this code on line 115:
    
    if ($tagdata !== FALSE) 
    And replace it with this:
    
    if ($tagdata !== FALSE AND $file_info === FALSE)
    {
        $tagdata = $this->EE->functions->prep_conditionals($tagdata, array());
    }
    else if ($tagdata !== FALSE)
  • #4 / Feb 16, 2012 11:37am

    Shane Eckert

    7174 posts

    Hello Brian_az,

    I am happy to hear it!

    And thank you for not making fun of me for spelling the word “your” wrong. I changed it, but it did say tour. My team mates found that pretty funny.

    Have a great Thursday!

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases