Fixed PHP warning
Merged from 5.2: PHP warning
Fixed PHP warnings
Merged from 5.2