php-school / php8-appreciate

2020 PHP: A showcase and classroom for the cutting edge features of PHP 8

Home Page:http://www.phpschool.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non-capturing catches

mikeymike opened this issue · comments

Name: Caution with Catches

Brief

  • You're writing a login validation service
    • Call function X to validate password (which we provide)
      • This will throw an exception with the password inside the message
    • The library in use is wrongly providing the password in the exception message
    • DO NOT USE!
    • Print a generic message

Verification

  • AST ensure that $e token isn't there.
  • Check password is not in exception