Skip to content

Commit

Permalink
Solved problem when receiving only one book from Marsupial publishers
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyserver committed Sep 23, 2014
1 parent 12c93aa commit 61338a3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function get_books_structure_publisher($publisher, $isbn = false) {
$books = get_books($publisher);
if(!empty($books)){
// Fix bug, when there is just one received book
if (!isset($books[0])) {
if (!is_array($books) || !isset($books[0])) {
$books = array($books);
}
echo '<ol>';
Expand Down

0 comments on commit 61338a3

Please sign in to comment.