-1

enter image description here

enter image description here

linea 25

if($respuesta["usuario"] == $_POST["ingUsuario"] && $respuesta["password"]== $encriptar){
Dharman
  • 30,962
  • 25
  • 85
  • 135
  • **Never store passwords in clear text or using MD5/SHA1!** Only store password hashes created using PHP's [`password_hash()`](https://php.net/manual/en/function.password-hash.php), which you can then verify using [`password_verify()`](https://php.net/manual/en/function.password-verify.php). Take a look at this post: [How to use password_hash](https://stackoverflow.com/q/30279321/1839439) and learn more about [bcrypt & password hashing in PHP](https://stackoverflow.com/a/6337021/1839439) – Dharman Nov 24 '20 at 17:43
  • Does this answer your question? [Trying to access array offset on value of type bool in PHP 7.4](https://stackoverflow.com/questions/59674903/trying-to-access-array-offset-on-value-of-type-bool-in-php-7-4) – Dharman Nov 24 '20 at 17:43

1 Answers1

1

Since PHP 7.4 it will generate a notice when trying to use values of type null, bool, int, float or resource as an array.

https://www.php.net/manual/en/migration74.incompatible.php#migration74.incompatible.core.non-array-access

Array-style access of non-arrays

Trying to use values of type null, bool, int, float or resource as an array (such as $null["key"]) will now generate a notice.

To avoid notice you could check first if $respuesta is an array:

if(is_array($respuesta) && $respuesta["usuario"] == $_POST["ingUsuario"] && $respuesta["password"]== $encriptar){
FlavioS
  • 51
  • 2