Permalink
Browse files

Can't use switch here due to `continue`.

The "continue" keyword does something different in a switch
and so we can't use it here. Fall back to if ().
  • Loading branch information...
1 parent 6473b94 commit 2f24710c4bf6b3b400997c390e573a64e782e9ec @sofar committed Oct 15, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 db.php
View
8 db.php
@@ -98,10 +98,10 @@
}
# ignore a few filetypes.
- $pi = pathinfo($image);
- switch (strtolower($pi['extension'])) {
- case 'thm':
- case 'nef':
+ $pi = pathinfo($d . "/" . $album . "/" . $image);
+ $pie = strtolower($pi['extension']);
+ # can't use switch here since "continue" doesn't behave normally in a switch statement
+ if (($pie == 'thm') || ($pie == 'nef')) {
$image = readdir($ih);
continue;
}

0 comments on commit 2f24710

Please sign in to comment.