Fixed bugs #47675 and #64577 (fd leak on Solaris)
fix null deref
Merge branch 'PHP-5.3' into PHP-5.4

# By Pierre Joye (1) and Rasmus Lerdorf (1)
* PHP-5.3:
  fix null deref
  Fixed bugs #47675 and #64577 (fd leak on Solaris)