Skip to content

Commit

Permalink
use \!empty() rather than error suppression
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris--S committed Mar 6, 2014
1 parent e1ecd6f commit b7a3421
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions inc/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,11 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){
$return = true;

// get ID and check if it is a valid one
$item['id'] = pathID($file,($type == 'd' || @$opts['keeptxt']));
$item['id'] = pathID($file,($type == 'd' || !empty($opts['keeptxt'])));
if($item['id'] != cleanID($item['id'])){
if($opts['showmsg'])
if($opts['showmsg']){
msg(hsc($item['id']).' is not a valid file name for DokuWiki - skipped',-1);
}
return false; // skip non-valid files
}
$item['ns'] = getNS($item['id']);
Expand Down

0 comments on commit b7a3421

Please sign in to comment.