help! Warning: basename() expects parameter 1 to be string

i have some simple PHP on my album.php in order to create a simple menu on each album page that displays a link to every album and makes the current album a non-link. here is the php:
`
<?php
$toplevelalbums = $_zp_gallery->getAlbums();
foreach($toplevelalbums as $album) {
$obj = new Album($_zp_gallery,$album);

if($_zp_current_album->name == $obj->name) { ?>

<?php echo $obj->getTitle(); ?>
<?php }
else {
?>
getAlbumLink());?>" class="menulink"><?php echo $obj->getTitle();?>

<?php } } ?>
`
this works fine, and it creates the menu exactly how i want it, however below this i get a printed warning:

`Warning: basename() expects parameter 1 to be string, object given in /home/content/s/u/m/summer83/html/zphoto/zp-core/template-functions.php on line 4539`

i'm not sure how to fix this, i suspect it may have something to do with my server or something?
any help would be greatly appreciated.

thanks!

Comments

  • Do'nt use `$obj` for a variable name. It is in conflict with a variable used in the base index.php script.
  • acrylian Administrator, Developer
    Maybe you should first look what already is there... The print_album_menu plugin already does this..
Sign In or Register to comment.