Andrew Fletcher published: 15 February 2022 1 minute read
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 Fletcher
•
28 Aug 2024
Troubleshooting PHP 8.3 mbstring issues on Ubuntu with Nginx
Maintaining a Drupal site is usually smooth sailing once the environment is properly set up. However, even in a stable environment, updates to modules can sometimes reveal underlying configuration issues that weren't apparent before. This was the case when I updated a contrib module on a Drupal 10.3...
Andrew Fletcher
•
29 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 Fletcher
•
13 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 ...