System error

error:  Can't call method "plan_id" on an undefined value at /var/www/html/special-api-remote.html line 43.
context: 
... 
39:  my $user_id = $m->comp('checkCookie.mas');
40:  my $user = PSG::Users->retrieve($user_id);
41: 
42:  my $notAdmin = '';
43:  if($user->plan_id) {
44:  $notAdmin = " AND user_id = $user_id ";
45:  }
46: 
47:  if($domain_url) {
... 
code stack:  /var/www/html/special-api-remote.html:43
raw error






























Can't call method "plan_id" on an undefined value at /var/www/html/special-api-remote.html line 43.


Trace begun at /usr/local/share/perl5/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "plan_id" on an undefined value at /var/www/html/special-api-remote.html line 43.^J') called at /var/www/html/special-api-remote.html line 43
HTML::Mason::Commands::__ANON__ at /usr/local/share/perl5/HTML/Mason/Component.pm line 138
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f7bf95e0698)') called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1300
eval {...} at /usr/local/share/perl5/HTML/Mason/Request.pm line 1295
HTML::Mason::Request::comp(undef, undef, undef) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 484
eval {...} at /usr/local/share/perl5/HTML/Mason/Request.pm line 484
eval {...} at /usr/local/share/perl5/HTML/Mason/Request.pm line 436
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x7f7bf95db680)') called at /usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 168
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x7f7bf95db680)') called at /usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 825
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x7f7bf6ce7ea8)', 'Apache2::RequestRec=SCALAR(0x7f7bf95ab930)') called at (eval 31) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache2::RequestRec=SCALAR(0x7f7bf95ab930)') called at -e line 0
eval {...} at -e line 0