Fix Params class at empty values.
This commit is contained in:
parent
f5967591e1
commit
b8d4f92ddc
@ -3,14 +3,18 @@
|
||||
namespace Libs;
|
||||
|
||||
class Params {
|
||||
|
||||
private $data;
|
||||
|
||||
public function __construct($args){
|
||||
$this->data = [];
|
||||
foreach($args as $index => $value){
|
||||
$this->$index = $value;
|
||||
$this->data[$index] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
public function __get($index){
|
||||
return (isset($this->$index) && $this->$index != '') ? urldecode($this->$index) : null;
|
||||
return (isset($this->data[$index]) && $this->data[$index] != '') ? urldecode($this->data[$index]) : null;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user