This will do the trick: @$thislayer->queryByPoint($querypoint,MS_SINGLE,-1); the '@' symbol tells php to suppress teh warning.