( ! ) Fatal error: Uncaught TypeError: App\Models\Product::getRelated(): Argument #1 ($categoryId) must be of type int, string given, called in /home/atimakco/public_html/app/Controllers/ProductController.php on line 60 and defined in /home/atimakco/public_html/app/Models/Product.php on line 161
( ! ) TypeError: App\Models\Product::getRelated(): Argument #1 ($categoryId) must be of type int, string given, called in /home/atimakco/public_html/app/Controllers/ProductController.php on line 60 in /home/atimakco/public_html/app/Models/Product.php on line 161
Call Stack
#TimeMemoryFunctionLocation
10.0001772952{main}( ).../index.php:0
20.00311307232App\Core\Router->dispatch( ).../index.php:381
30.00321308120App\Core\Router->callHandler( $handler = 'ProductController@show', $params = ['slug' => 'test'] ).../Router.php:108
40.01071313064call_user_func_array:{/home/atimakco/public_html/app/Core/Router.php:160}( $callback = [0 => class App\Controllers\ProductController { protected App\Core\Database $db = class App\Core\Database { ... }; protected App\Core\SessionManager $session = class App\Core\SessionManager { ... }; protected App\Core\Security $security = class App\Core\Security { ... }; protected App\Core\Mailer $mailer = class App\Core\Mailer { ... }; private App\Models\Product $productModel = class App\Models\Product { ... }; private App\Models\ProductCategory $categoryModel = class App\Models\ProductCategory { ... }; private App\Models\Setting $settingModel = class App\Models\Setting { ... } }, 1 => 'show'], $args = ['slug' => 'test'] ).../Router.php:160
50.01071313248App\Controllers\ProductController->show( $slug = 'test' ).../Router.php:160
60.01071313248App\Controllers\ProductController->detail( $slug = 'test' ).../ProductController.php:84
70.01321315920App\Models\Product->getRelated( $categoryId = '1', $excludeId = '1', $limit = 4 ).../ProductController.php:60