Skip to main content

Updating to PHP 8.1, I found this interesting code stop...

Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated in bales_preprocess() (line 162 of /var/www/{path/to/file})

What is trim(). Very simply, it removes whitespaces (if they exist) at the start or end of a string.

Related articles

Andrew Fletcher29 Sep 2023
How to install PHP 8.1 on Ubuntu 20.04
Update Ubuntu 20.04To begin update the server using the commandsudo apt update && sudo apt upgrade -yFor more details about this process see How To Update All Packages Linux. PHP versionCheck the current PHP version usingphp -vThe response I had wasPHP 7.4.3 (cli) (built: Nov 2...
Andrew Fletcher13 Feb 2023
brew changing PHP versions on OSX
Installing PHP on OSX and it installed PHP 8.2.x.  However, for my applications I need to run 8.1.x.  How do you switch the current PHP version?   Current version Check the current PHP version by executing the command php -v Response: PHP 8.2.2 (cli) (built: Feb ...