I'm the developer for a service in PHP. Part of the service requires registering a domain name, which is relatively simple given most domain registras have an API available. I'm building the web site using Zend Framework in PHP5. The problem is that the API library given to me is written for use with php 3 or 4, and so uses all the depreciated function calls and does annoying things like define constants more than once etc! This causes lots of notices about depreciated functions and warnings when the app runs.
If I set e_notice and e_warning off, the API works fine. However, this seems like a bad hack to me. I've turned error reporting to strict in my bootstrap file for ZF, and I want to keep it this way. I could turn error reporting off for the API includes and calls, but this could get really messy.
Rewritting the library seems like a big mission (it's a few thousand lines, and it's not exactly easy to follow!)
Is there a common solution to a problem like this? This is the first time I've used an external library. I will value any advice. Thanks in advance!






Bookmarks