It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.
If you suppress an error, we recommend checking for the error condition explicitly:
// For example instead of@mkdir($dir);// Better useif(@mkdir($dir)===false){thrownew\RuntimeException('The directory '.$dir.' could not be created.');}
Loading history...
21
'Passing other values than a string on '.__METHOD__.' is deprecated since version 2.2.'
22
.' It will be considered as invalid on version 3.0.',
23
E_USER_DEPRECATED
24
);
25
}
26
27
// Add !is_string($creditCard) to the condition on 3.0.
28
if (trim($creditCard) === '') {
29
return false;
30
}
31
32
if (!boolval(preg_match('/.*[1-9].*/', $creditCard))) {
If you suppress an error, we recommend checking for the error condition explicitly: