Fixed PHP deprecated assigning of return value.

(E_DEPRECATED) php warning: Assigning the return value of new by reference is deprecated.