Moved TSRMLS_FETCH() into error branches.