System error

error:  Can't use an undefined value as a HASH reference at /www/occasion2remember.com/htdocs/m/getImage line 27.
context: 
... 
23:  $q = 'img_id';
24:  } else {
25:  $q = 'tree_id';
26:  }
27:  %image = %{$dbh->selectrow_hashref(qq{
28:  SELECT id, orig_ext, orig_width, orig_height, large_width, large_height,
29:  thumb_width, thumb_height, hits, title, keywords, tree_id
30:  FROM tree INNER JOIN images ON img_id = id
31:  WHERE $q = ?
... 
code stack:  /www/occasion2remember.com/htdocs/m/getImage:27
/www/occasion2remember.com/htdocs/products/larger.html:37
/www/occasion2remember.com/htdocs/autohandler:3
raw error






























Can't use an undefined value as a HASH reference at /www/occasion2remember.com/htdocs/m/getImage line 27.


Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 125
HTML::Mason::Exceptions::rethrow_exception('Can\'t use an undefined value as a HASH reference at /www/occasion2remember.com/htdocs/m/getImage line 27.^J') called at /www/occasion2remember.com/htdocs/m/getImage line 27
HTML::Mason::Commands::__ANON__(0) called at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x55c16256e920)', 0) called at /usr/share/perl5/HTML/Mason/Request.pm line 1300
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, 0) called at /www/occasion2remember.com/htdocs/products/larger.html line 37
HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x55c16255d3f0)') called at /usr/share/perl5/HTML/Mason/Request.pm line 1302
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/share/perl5/HTML/Mason/Request.pm line 955
HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0x55c16255d8f8)') called at /www/occasion2remember.com/htdocs/autohandler line 3
HTML::Mason::Commands::__ANON__ at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x55c16255e7d8)') called at /usr/share/perl5/HTML/Mason/Request.pm line 1300
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/share/perl5/HTML/Mason/Request.pm line 481
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 481
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 433
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x55c16255d8f8)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x55c16255d8f8)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 831
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x55c160726500)', 'Apache2::RequestRec=SCALAR(0x55c1603efe48)') called at /etc/apache2/HTML/Mason/Bushong.pm line 99
HTML::Mason::Bushong::handler('Apache2::RequestRec=SCALAR(0x55c1603efe48)') called at -e line 0
eval {...} at -e line 0