Zen Cart Logo
Forums / Bug Reports / Admin | Customers edit customer undefined key when customer fax turned off

Admin | Customers edit customer undefined key when customer fax turned off

Views: 1,241

Results 1 to 2 of 2
1 Apr 2022, 1:27 AM
#1
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
423
Plugin Contributions:
0

Admin | Customers edit customer undefined key when customer fax turned off

zc157d vanilla with PHP 8.0

Minor bug
Warning Undefined array key "customers_fax" in admin\customers.php on line 92.

This occurs when Admin | Configuration | Customer Details | Fax Number = false
and Customer Details are edited.

I changed (changes in red)

$customers_fax = zen_db_prepare_input($_POST['customers_fax'] );

to

$customers_fax = zen_db_prepare_input(($_POST['customers_fax'] ?? ''));
1 Apr 2022, 5:58 AM
#2
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

Re: Admin | Customers edit customer undefined key when customer fax turned off

Most of these things have already been dealt with on Github, always worth having a search in the issues there first:
https://github.com/zencart/zencart/pull/3618