Projekt

Allgemein

Profil

GX-Abgewiesen #68704

Von Ahmed Hamouda vor fast 3 Jahren aktualisiert

An exception is being raised when table admin_access is empty and payments modules miscellaneous page is being called. Query return in `src/includes/classes/class.heidelpaygw.php:137` should be checked if null or iterable. 


 Replication steps: 
 1. make sure that table admin_access is empty 
 2. navigate in the admin dashboard to Modules > Payment Methods > Miscellaneous or visit the following URL http://my.shop/admin/modules.php?set=payment (replace my.shop with your shop URL)  

 Another symptom is empty payment methods on the checkout page. 

 Expected: 
 A list of payment modules is available. 



 Actual: 
 SQL Exception 


 ``` 
 Sample exceptions: exception: 
 2021-05-27 08:46:03 WARNING: Invalid argument supplied for foreach() 

 context:  	
 code: 	
 2 
 file: 	
 /var/www/html/gambiostable/includes/classes/class.heidelpaygw.php 
 line: 	
 139 
 content:  	
 ... 
 logHash: 	
 logger-60af402b53d328.62388659 
 extra: 	

 ``` 


 ``` 
 Uncaught RuntimeException: SQL Error! 
 Duplicate column name 'heidelpaygw' 
 Query: ALTER TABLE `admin_access` ADD `heidelpaygw` INT( 1 ) NOT NULL DEFAULT '0'; in /var/www/html/gambiostable/inc/xtc_db_error.inc.php:35 
 Stack trace: 
 #0 /var/www/html/gambiostable/inc/xtc_db_query.inc.php(78): xtc_db_error() 
 #1 /var/www/html/gambiostable/includes/classes/class.heidelpaygw.php(144): xtc_db_query() 
 #2 /var/www/html/gambiostable/includes/classes/class.heidelpaygw.php(65): heidelpayGW->checkAdminAccess() 
 #3 /var/www/html/gambiostable/includes/modules/payment/hppf.php(27): heidelpayGW->__construct() 
 #4 /var/www/html/gambiostable/admin/includes/gm/classes/GMModulesManager.php(122): hppf_ORIGIN->__construct() 
 #5 /var/www/html/gambiostable/admin/modules.php(250): GMModuleManager_ORIGIN->repair() 
 #6 {main} 
   thrown 

 ``` 



Zurück