Web-app: fixed php 5.2 compatibility issue