System error

error:  Can't use an undefined value as a HASH reference at /var/www/mike/toxicrisk.com/reports/rmp_index.cmp line 169.
context: 
... 
165:  <%init>
166:  my %sth;
167:  $sth{rmp_getById} = $dbh->prepare('SELECT * FROM registrations WHERE rmp=?');
168:  $sth{rmp_getById}->execute($fac_id);
169:  my %f = %{$sth{rmp_getById}->fetchrow_hashref()};
170:  if($f{sub_type} eq 'f'){ $f{sub_type}='First-Time Submission'; }
171:  elsif($f{sub_type} eq 'c'){ $f{sub_type}='Correction or Administrative Change'; }
172:  elsif($f{sub_type} eq 'r'){ $f{sub_type}='Re-Submission'; }
173: 
... 
code stack:  /var/www/mike/toxicrisk.com/reports/rmp_index.cmp:169
/var/www/mike/toxicrisk.com/reports/dhandler:25
/home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm:948
/etc/apache2/mason/obj/2044519016/reports/dhandler.obj:17
/var/www/mike/toxicrisk.com/autohandler:43
/var/www/mike/toxicrisk.com/setup.cmp:4
raw error






























Can't use an undefined value as a HASH reference at /var/www/mike/toxicrisk.com/reports/rmp_index.cmp line 169.


Trace begun at /home/mike/local-lib/lib/perl5/HTML/Mason/Exceptions.pm line 125
HTML::Mason::Exceptions::rethrow_exception('Can\'t use an undefined value as a HASH reference at /var/www/mike/toxicrisk.com/reports/rmp_index.cmp line 169.^J') called at /var/www/mike/toxicrisk.com/reports/rmp_index.cmp line 169
HTML::Mason::Commands::__ANON__('fac_id', 17895) called at /home/mike/local-lib/lib/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x5644ae349988)', 'fac_id', 17895) called at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 1302
eval {...} at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, 'fac_id', 17895) called at /var/www/mike/toxicrisk.com/reports/dhandler line 25
HTML::Mason::Commands::__ANON__ at /home/mike/local-lib/lib/perl5/HTML/Mason/Component.pm line 157
HTML::Mason::Component::run_dynamic_sub('HTML::Mason::Component::FileBased=HASH(0x5644ade1d5e0)', 'main') called at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 948
HTML::Mason::Request::call_dynamic('HTML::Mason::Request::ApacheHandler=HASH(0x5644ae533750)', 'main') called at /etc/apache2/mason/obj/2044519016/reports/dhandler.obj line 17
HTML::Mason::Commands::__ANON__ at /home/mike/local-lib/lib/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x5644ade1d5e0)') called at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 1302
eval {...} at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef) called at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 955
HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0x5644ae533750)') called at /var/www/mike/toxicrisk.com/autohandler line 43
HTML::Mason::Commands::__ANON__ at /home/mike/local-lib/lib/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x5644add9d2d8)') called at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 1302
eval {...} at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef) called at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 955
HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0x5644ae533750)') called at /var/www/mike/toxicrisk.com/setup.cmp line 4
HTML::Mason::Commands::__ANON__ at /home/mike/local-lib/lib/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x5644add9d608)') called at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 1300
eval {...} at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef) called at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 481
eval {...} at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 481
eval {...} at /home/mike/local-lib/lib/perl5/HTML/Mason/Request.pm line 433
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x5644ae533750)') called at /home/mike/local-lib/lib/perl5/HTML/Mason/ApacheHandler.pm line 168
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x5644ae533750)') called at /home/mike/local-lib/lib/perl5/HTML/Mason/ApacheHandler.pm line 825
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x5644ade652e8)', 'Apache2::RequestRec=SCALAR(0x5644ade651c8)') called at (eval 26) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache2::RequestRec=SCALAR(0x5644ade651c8)') called at -e line 0
eval {...} at -e line 0