Fixing several php notices

Greetings, during the execution I got some Notices from php about values not being present, etc. I fixed them and hope it would be useful.
Thanks for a great library!

Regards,
Alex.