PHP 8.1 Deprecated str_replace problem

Yepkoo

Yepkoo
Staff member
PHP:
/* You can solve this problem by checking for NULL and whitespace values. */
    function ch_replace($fncdata='') {
        if (!empty($fncdata) and $fncdata != NULL) {
            $fncdata = str_replace('-','_',$fncdata);
        }
    }
 
Top