Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
The $parts array is formed from the value of $this->request->get['path'] by splitting this value into parts at the underscore character. If $this->request->get['path'] is empty, then $parts will be empty and an error will occur.
Since $category_id is allowed to be null later in the script, add $parts = array(0); before the 45th line, the error will disappear. And it's better to do:
//-- GET ALL PRODUCTS FILTER BY CATEGORY
if(isset($this->request->get['path'])) {
$parts = explode('_', (string)$this->request->get['path']);
$category_id = (int)array_pop($parts);
} else {
$category_id = 0;
}
First, does it refer to itself? O_O How is it theoretically even supposed to work?
Second, you can't do that.
In the constructor, sculpt if you need to do so.
Tell me, is it generally correct to set so many properties?
Do I understand correctly that in the context of a large property system, classes should be grouped into DTOs?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question