What are you doing to get that error?
I would suspect some bot playing with the urls and variables because one would never get an error through normal program operation.
Here is the query in editphoto.php or adm-misc.php
Code:
Content visible to verified customers only.
$puserid is definately defined but you can stop any error if this is indeed a bot by encapsulating $puserid in that query with single quotes
Code:
Content visible to verified customers only.