Pārlūkot izejas kodu

handle validation fails correctly

George Baugh 5 mēneši atpakaļ
vecāks
revīzija
63f48e2c02
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      lib/TPSGI.pm

+ 3 - 0
lib/TPSGI.pm

@@ -741,6 +741,9 @@ sub route {
     # GET, POST, URI captures, then explicit data overrides.
     my $query = $self->extract_query( $path, $route, $env );
 
+	# We failed validation if $query isn't a hashref.
+	return $query if ref $query eq 'ARRAY';
+
     # allow this stuff to survive down to the end of some routes
     $query->{last_fetched} = $last_fetch;
     $query->{deflate}      = $deflate;