| ( ! ) 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 |
| # | Time | Memory | Function | Location |
| 1 | 0.0001 | 772952 | {main}( ) | .../index.php:0 |
| 2 | 0.0031 | 1307232 | App\Core\Router->dispatch( ) | .../index.php:381 |
| 3 | 0.0032 | 1308120 | App\Core\Router->callHandler( $handler = 'ProductController@show', $params = ['slug' => 'test'] ) | .../Router.php:108 |
| 4 | 0.0107 | 1313064 | call_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 |
| 5 | 0.0107 | 1313248 | App\Controllers\ProductController->show( $slug = 'test' ) | .../Router.php:160 |
| 6 | 0.0107 | 1313248 | App\Controllers\ProductController->detail( $slug = 'test' ) | .../ProductController.php:84 |
| 7 | 0.0132 | 1315920 | App\Models\Product->getRelated( $categoryId = '1', $excludeId = '1', $limit = 4 ) | .../ProductController.php:60 |