Issue #3313430 by Arturo1007, davidhk, juancec, johan.gant: php TypeOf error if node has been deleted
Closes #3313430