Commit ff358031 authored by Andy Yates's avatar Andy Yates
Browse files

[ENSCORESW-564]. Added integer checks.

The code previously allowed bogus numbers through into the final slice which
caused errors in later methods. The website crashed because of this. We will
reject anything that was not an integer if the start or end was defined.
parent e595a961
......@@ -103,6 +103,7 @@ use Bio::EnsEMBL::LRGSlice;
use Bio::EnsEMBL::Utils::Exception qw(throw deprecate warning stack_trace_dump);
use Bio::EnsEMBL::ProjectionSegment;
use Scalar::Util qw/looks_like_number/;
use Bio::EnsEMBL::Utils::Scalar qw/assert_integer/;
@ISA = ('Bio::EnsEMBL::DBSQL::BaseAdaptor');
......@@ -196,6 +197,9 @@ sub fetch_by_region {
$strand, $version, $no_fuzz )
= @_;
assert_integer($start, 'start') if $start;
assert_integer($end, 'end') if $end;
if ( !defined($start) ) { $start = 1 }
if ( !defined($strand) ) { $strand = 1 }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment