shop icon indicating copy to clipboard operation
shop copied to clipboard

Löschen einer Kategorie schmeisst Fehler

Open gaffling opened this issue 3 years ago • 1 comments

Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 0 passed in /function/utilities.php on line 209 and exactly 2 expected in /routes.php:170 Stack trace: #0 /function/utilities.php(209): {closure}() #1 /includes.php(45): require_once('/Applications/M...') #3 /index.php(14): require('/Applications/M...') #4 {main} thrown in /routes.php on line 170

gaffling avatar Apr 26 '21 09:04 gaffling

Die Route in der routes.php sollte wie folgt aussehen.

router('/category/delete/',function() use($userId,$baseUrl,$isEmail,$countCartItems){
  logger('INFO','Wir sind auf der URL /category/delete');
  require_once ACTIONS_DIR . '/category.delete.real.php';
  logEnd();
},'POST');

Also unter function() die Parameter entfernen.

dab767 avatar Jan 04 '22 20:01 dab767