unclecheese / silverstripe-display-logic

The Display Logic module allows you to add conditions for displaying or hiding certain form fields based on client-side behavior.
BSD 3-Clause "New" or "Revised" License
74 stars 71 forks source link

PHP8.1 compatibility #140

Closed bitwingsde closed 2 years ago

bitwingsde commented 2 years ago

The function "addslashes" must contain a value. NULL is no longer allowed in PHP8.1 File: src/Criterion.php Line: 93

Solution:


return sprintf(
    "this.findHolder('%s').evaluate%s('%s')",
    $this->master,
    $this->operator,
    addslashes($this->value ?? '')
);