Use empty instead of count to avoid warnings
This commit is contained in:
parent
1f8473929b
commit
09918ad666
1 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ $files = array_reverse($files);
|
||||||
// Get Files for current Page
|
// Get Files for current Page
|
||||||
$curfiles = array_slice($files, ($page-1)*$slice ,$slice, true);
|
$curfiles = array_slice($files, ($page-1)*$slice ,$slice, true);
|
||||||
|
|
||||||
if (count($curfiles) > 0 | count($dirs) > 0) {
|
if (!empty($curfiles)| !empty($dirs)) {
|
||||||
// Prepare Generic Data for Template
|
// Prepare Generic Data for Template
|
||||||
$data['galleryname'] = $galleryname;
|
$data['galleryname'] = $galleryname;
|
||||||
$data['startpage'] = $_SERVER['PHP_SELF'];
|
$data['startpage'] = $_SERVER['PHP_SELF'];
|
||||||
|
@ -84,7 +84,7 @@ if (count($curfiles) > 0 | count($dirs) > 0) {
|
||||||
|
|
||||||
// Prepare Mode Specific Data and Render Template
|
// Prepare Mode Specific Data and Render Template
|
||||||
if ($slice > 1) {
|
if ($slice > 1) {
|
||||||
if (count($curfiles) > 0) {
|
if (!empty($curfiles)) {
|
||||||
foreach ($curfiles as $index => $image) {
|
foreach ($curfiles as $index => $image) {
|
||||||
$tmp['n'] = $image;
|
$tmp['n'] = $image;
|
||||||
$tmp['i'] = $index+1;
|
$tmp['i'] = $index+1;
|
||||||
|
|
Loading…
Reference in a new issue