1
0

fix selftest warning in books

This commit is contained in:
Mike Schwörer 2020-02-21 03:24:17 +01:00
parent 42254915a7
commit 54204ead13
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF

View File

@ -83,7 +83,7 @@ class Books implements IWebsiteModule
if (!file_exists($eipath)) return ['result'=>'err', 'message' => 'Extra-Image not found ' . $book['title_short']]; if (!file_exists($eipath)) return ['result'=>'err', 'message' => 'Extra-Image not found ' . $book['title_short']];
} }
if ($book['book_count'] <= 0) return ['result'=>'err', 'message' => 'BookCount must be greater than zero ' . $book['title_short']]; if ($book['book_count'] < 0) return ['result'=>'err', 'message' => 'BookCount must be greater than zero ' . $book['title_short']];
if ($book['book_count'] > 1 && !is_array($book['pdf'])) return ['result'=>'err', 'message' => 'Attribute [pdf] must be an array ' . $book['title_short']]; if ($book['book_count'] > 1 && !is_array($book['pdf'])) return ['result'=>'err', 'message' => 'Attribute [pdf] must be an array ' . $book['title_short']];
if ($book['book_count'] > 1 && count($book['pdf']) !== $book['book_count']) return ['result'=>'err', 'message' => 'Attribute [pdf] must be the correct size ' . $book['title_short']]; if ($book['book_count'] > 1 && count($book['pdf']) !== $book['book_count']) return ['result'=>'err', 'message' => 'Attribute [pdf] must be the correct size ' . $book['title_short']];