Fixed undefined property error in PHP5.5.

Undefined property error occurring in the PHP5.5.x.
Added processing so as to avoid the problem.