Open bkfox opened 12 years ago
In the udp scapper, you should invert
foreach($infohash as $hash){ if(!preg_match('#^[a-f0-9]{40}$#i',$hash)){ throw new ScraperException('Invalid infohash: ' . $hash . '.'); } } if(count($infohash) > 74){ throw new ScraperException('Too many infohashes provided.'); }
by:
if(count($infohash) > 74){ throw new ScraperException('Too many infohashes provided.'); } foreach($infohash as $hash){ if(!preg_match('#^[a-f0-9]{40}$#i',$hash)){ throw new ScraperException('Invalid infohash: ' . $hash . '.'); } }
it should be better for perfs
It would be nice if you can send me this change as pull request
In the udp scapper, you should invert
by:
it should be better for perfs