Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to a member function productIds() on null Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "Call to a member function productIds() on null" Stacktrace: #0 Symfony\Component\Debug\Exception\FatalThrowableError in /home/pop00/pop.com.ua/new0/app/Http/Controllers/SiteController.php:341
Application frames (1) All frames (1)
0
Symfony
\
Component
\
Debug
\
Exception
\
FatalThrowableError
/
app
/
Http
/
Controllers
/
SiteController.php
341
/
home
/
pop00
/
pop.com.ua
/
new0
/
app
/
Http
/
Controllers
/
SiteController.php
    public function page($slug){
        $page = Page::where('slug',$slug)->first();
        return view('page',[
            'page' => $page,
        ]);
    }
 
    public function searchProducts(Request $request){
        $searchRequest = $request->searchRequest;
        return view('search',[
            'searchRequest' => $searchRequest,
            'products' =>$searchRequest? Product::whereTranslationLike('title', "%$searchRequest%")->get():[],
        ]);
    }
 
    public function category($slug){
        $category = Category::where('slug',$slug)->first();
        return view('category',[
            'category' => $category,
            'products' => Product::whereIn('id', $category->productIds())->paginate(20),
            'characteristics' => $category->getCharacteristics(),
            'filterCharacteristicIds' => [],
            'filterSizes' => [],
            'parentCategories' => Category::find( $category->parentCategoryIds()),
        ]);
    }
 
    public function categoryFilter($slug,$filterCharacteristicIds='',$sizes=''){
        $filterCharacteristicIds = $filterCharacteristicIds? explode(',',$filterCharacteristicIds):[];
        $sizes=$sizes?explode(',',$sizes):[];
        $category = Category::where('slug',$slug)->first();
        return view('category',[
            'category' => $category,
            'products' => Product::whereIn('id', $category->filteredProductIds($filterCharacteristicIds,$sizes))->paginate(20),
            'characteristics' => $category->getCharacteristics($filterCharacteristicIds),
            'filterCharacteristicIds' => $filterCharacteristicIds,
            'filterSizes' => $sizes,
            'parentCategories' => Category::find( $category->parentCategoryIds()),
        ]);
    }
Arguments
  1. "Call to a member function productIds() on null"
    

Environment & details:

Key Value
_url
"/category/shkolnaya-forma-2612181532056"
empty
empty
empty
empty
Key Value
PHPRC
"/home/pop00/.system/php/new0.pop.com.ua.ini"
PWD
"/home/pop00/pop.com.ua/new0/"
SERVING_HOST_INFO
"apache:php72:1190157:154939:new0.pop.com.ua;"
TMP
"/home/pop00/.system/tmp"
TMPDIR
"/home/pop00/.system/tmp"
SHLVL
"0"
TEMP
"/home/pop00/.system/tmp"
PATH
"/usr/local/bin:/usr/bin:/bin"
HTTP_ACCEPT
"*/*"
HTTP_CONNECTION
"close"
CONTENT_LENGTH
"0"
HTTP_HOST
"new0.pop.com.ua"
HTTP_USER_AGENT
"claudebot"
HTTP_GEOIP_COUNTRY_CODE
"US"
HTTP_X_FORWARDED_PROTO
"http"
HTTP_X_INTERNAL_REAL_IP
"44.201.199.251"
REDIRECT_REDIRECT_UNIQUE_ID
"ZgaN17gjPC4kK-v6cejwsQAAAHk"
REDIRECT_REDIRECT_SCRIPT_URL
"/category/shkolnaya-forma-2612181532056"
REDIRECT_REDIRECT_SCRIPT_URI
"http://new0.pop.com.ua/category/shkolnaya-forma-2612181532056"
REDIRECT_REDIRECT_vhost_id
"1190157"
REDIRECT_REDIRECT_account_id
"154939"
REDIRECT_REDIRECT_PWD
"/home/pop00/pop.com.ua/new0/"
REDIRECT_REDIRECT_TMP
"/home/pop00/.system/tmp"
REDIRECT_REDIRECT_TEMP
"/home/pop00/.system/tmp"
REDIRECT_REDIRECT_STATUS
"200"
REDIRECT_UNIQUE_ID
"ZgaN17gjPC4kK-v6cejwsQAAAHk"
REDIRECT_SCRIPT_URL
"/category/shkolnaya-forma-2612181532056"
REDIRECT_SCRIPT_URI
"http://new0.pop.com.ua/category/shkolnaya-forma-2612181532056"
REDIRECT_vhost_id
"1190157"
REDIRECT_account_id
"154939"
REDIRECT_PWD
"/home/pop00/pop.com.ua/new0/"
REDIRECT_TMP
"/home/pop00/.system/tmp"
REDIRECT_TEMP
"/home/pop00/.system/tmp"
REDIRECT_STATUS
"200"
UNIQUE_ID
"ZgaN17gjPC4kK-v6cejwsQAAAHk"
SCRIPT_URL
"/category/shkolnaya-forma-2612181532056"
SCRIPT_URI
"http://new0.pop.com.ua/category/shkolnaya-forma-2612181532056"
vhost_id
"1190157"
account_id
"154939"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"Apache"
SERVER_NAME
"new0.pop.com.ua"
SERVER_ADDR
"127.0.0.1"
SERVER_PORT
"80"
REMOTE_ADDR
"44.201.199.251"
DOCUMENT_ROOT
"/home/pop00/pop.com.ua/new0/"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/home/pop00/pop.com.ua/new0/"
SERVER_ADMIN
"server@admin.com"
SCRIPT_FILENAME
"/home/pop00/pop.com.ua/new0/public/index.php"
REMOTE_PORT
"10166"
REDIRECT_URL
"/public/category/shkolnaya-forma-2612181532056"
REDIRECT_QUERY_STRING
"_url=/category/shkolnaya-forma-2612181532056"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
"_url=/category/shkolnaya-forma-2612181532056"
REQUEST_URI
"/category/shkolnaya-forma-2612181532056"
SCRIPT_NAME
"/public/index.php"
PHP_SELF
"/public/index.php"
REQUEST_TIME_FLOAT
1711705559.3061
REQUEST_TIME
1711705559
empty
0. Whoops\Handler\PrettyPageHandler