Bugfix for php 5.2 port (search)