Update whatsprot.class.php

Correction PHP Fatal error:  Call to a member function getAttribute() on a non-object
Merge pull request #87 from Amirjan/patch-13

Fatal Error Fix