PHP Fatal error: Unsupported operand types

PHP is a very flexible language, but sometimes you’re not passing it what you expect. If you’re trying to do arithmetic, PHP will handle and convert pretty much anything except an array. So chances are if you get the “Fatal error: Unsupported operand types in” error, then you’re not adding two variables that you think you are. To troubleshoot simply do a var_dump(); before the operation that it is erroring out at...

Read More