After upgrading our servers to PHP 8.1, we received a warning as Deprecated: Required parameter $x follows optional parameter $y This was the code that has this error: public function function_name ($y=”, $x) { function code…. } To fix this, we changed the above code to: public function function_name ($y, $x) { $y=$y ?? ”; ..
Category : PHP Errors
DOMPDF image not showing in your PHP script like the above screenshot. Don’t worry, it’s just a small problem. First of all get the latest version of the library from this Github link. If DOMPDF image not showing when you download the PDF in your script then it means your DOMPDF is not allowing remote ..
Fatal error: Uncaught TypeError: Unsupported operand types: string + float error comes when one of your variables is a string and another one is float. Let’s say, we have the following code: $Total = $Var1 + $Var2; If this throws Fatal error: Uncaught TypeError: Unsupported operand types: string + float error then simply add (float) ..