Fix: address problems identified by PHP Analyzer