Answers for "cannot use isset() on the result of an expression (you can use "null !== expression" instead)"

1

cannot use isset() on the result of an expression (you can use "null !== expression" instead)

if(isset($userEmail = $_POST["email"]) && $userEmail = $_POST["email"] != ""){
Here, you are assigning it to a variable and then checking isset all in a single call. Split it up into separate calls:

check if it is set
check if it is not an empty string
validate it against the built-in email validator
assign it to a variable
Likely should be

if(isset($_POST["email"]) && $_POST["email"] != "") {
    if(filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) {   
        ...
        $userEmail = $_POST["email"];
        ...
Posted by: Guest on March-03-2021
0

cannot use isset() on the result of an expression (you can use "null !== expression" instead)

if ( isset($_GET['reply_id'], $_GET['reply_user']) ) {
      // code here
 }
Posted by: Guest on March-03-2021

Code answers related to "cannot use isset() on the result of an expression (you can use "null !== expression" instead)"

Code answers related to "Javascript"

Browse Popular Code Answers by Language