$this->security->get returns Undefined Index error

Bug #702600 reported by jsherk

This bug report was converted into a question: question #141403: $this->security->get returns Undefined Index error.

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PHPDevShell
Invalid
Undecided
Unassigned

Bug Description

When I use $this->security->post['some_item'] and some_item is not set, it works fine (no error), but when you use $this->security->get['some_item'] and some_item is not set it gives you a warning/notice that says:
Undefined index: some_item

Revision history for this message
TitanKing (titan-phpdevshell) wrote :

This in general is standard PHP behavior. You need to check variables are set be fore using them. The empty() function works well for this.

if (! empty($this->security->get['some_item'])) {
    // Do something...
}

Changed in phpdevshell:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.