Skip to content

How to check array exist when duplicate image #173

@ruslyrossi

Description

@ruslyrossi

When i try to check array exist it will return this error

Warning: array_reverse() [function.array-reverse]: The argument should be an array in /home/sritamac/public_html/wp-content/plugins/magic-fields/get-custom.php on line 306

Warning: sort() expects parameter 1 to be array, null given in /home/sritamac/public_html/wp-content/plugins/magic-fields/get-custom.php on line 307

below is my code :

<div id="wrap">
    <ul id="mycarousel" class="jcarousel-skin-tango">
        <?php
        $images = getFieldOrder('image_gal');
        foreach ($images as $image) { //loop image 
        ?>
        <li>
            <a class="group3"  href="<?php echo get('image_gal', 1, $image);?>">
                <img src="<?php echo get('image_gal', 1, $image);?>" width="150" height="150" alt="" />
            </a>
        </li>  
        <?php
        }
        ?>  
    </ul>
</div>

*im using MF Version 1.5.8.1 , i think the problem maybe with getFieldOrder() .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions