Multiple Images Problem

70 views
Skip to first unread message

Tyler

unread,
Feb 4, 2010, 11:18:26 AM2/4/10
to Magic Fields
My website is this http://www.berman.tylerstefanich.com/
and I get all these errors

Warning: Invalid argument supplied for foreach() in /home/tilar/
berman.tylerstefanich.com/wp-content/plugins/magic-fields/get-
custom.php on line 193

Warning: array_reverse() [function.array-reverse]: The argument should
be an array in /home/tilar/berman.tylerstefanich.com/wp-content/
plugins/magic-fields/get-custom.php on line 197

Warning: sort() expects parameter 1 to be array, null given in /home/
tilar/berman.tylerstefanich.com/wp-content/plugins/magic-fields/get-
custom.php on line 198

Warning: Invalid argument supplied for foreach() in /home/tilar/
berman.tylerstefanich.com/wp-content/themes/clean-home/index.php on
line 13

and I used this code

<?php
$images = getFieldOrder('Images');
foreach($images as $image){
echo "<a href='" .get('Images',1,$image). "'rel='lightbox'>";
echo get_image('Images',1,$image);
echo "</a>";
}
?>


i was wondering what is wrong

Tyler

unread,
Feb 4, 2010, 11:42:15 AM2/4/10
to Magic Fields
Ok I figured it out. That it only throws errors on posts that have no
images. How do I stop that from happening.

On Feb 4, 10:18 am, Tyler <tyler.stefan...@gmail.com> wrote:
> My website is thishttp://www.berman.tylerstefanich.com/

Hunk

unread,
Feb 4, 2010, 8:46:53 PM2/4/10
to Magic Fields
<?php
$images = getFieldOrder('Images');
if(is_array($images)){

foreach($images as $image){
echo "<a href='" .get('Images',1,$image). "'rel='lightbox'>";
echo get_image('Images',1,$image);
echo "</a>";
}
}

?>

Reply all
Reply to author
Forward
0 new messages