Closed torvista closed 5 years ago
Could you post the full contents of that log?
[22-Jul-2019 19:32:20 Europe/Madrid] PHP Notice: Undefined index: admin_pass in D:\Documents\Dropbox\Dev\public_html\tienda-156\includes\classes\observers\class.emp_order_observer.php on line 93
I don't see how that's possible (nor can I recreate the issue). Starting at line 87 (and ending with 93):
$check = $db->Execute(
"SELECT admin_id, admin_pass
FROM " . TABLE_ADMIN . "
WHERE admin_id = " . (int)EMP_LOGIN_ADMIN_ID . "
LIMIT 1"
);
if (!$check->EOF && (zen_validate_password($p2, $check->fields['admin_pass'])) || zen_validate_password($pwd2, $check->fields['admin_pass'])) {
If the query was successful (the first clause), then the admin_pass
field was pulled from the database and is available for use. I'm obviously missing something, but I can't explain what you're seeing.
It's generated when the password is incorrect:
if (!$check->EOF && (zen_validate_password($p2, $check->fields['admin_pass'])) || zen_validate_password($pwd2, $check->fields['admin_pass']))
and so the OR latter part of the clause gets parsed.
The problem was a misplaced right-parentheses; I've got to get my glasses cleaned.
@torvista, since you opened this issue it's yours to close if you feel that it's been corrected.
php 7.3.7 Using Report All Errors Login as customer with normal login: add something to cart. Logout. Login as EMP, it goes directly to the cart, get debug error:
Trying to login with an incorrect password also causes a debug.