Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.0.1
-
Fix Version/s: None
-
Component/s: Zend_Gdata
-
Labels:None
Description
If PHP was compiled with '--disable-dom', then various classes relied upon by the Zend_Gdata module will not exist and things will break. Right now, this manifests as a "Class 'DOMDocument' not found" error.
Rather than let this happen, a check should be made to see if the DOM extension is loaded, and if it isn't print a descriptive error message to help users understand the problem.
That's a fine idea, but for what it's worth DOM is usually enabled by default. We have used the PHP binary distribution from php.net and Zend Core as our benchmarks for what extensions are built and enabled by default. In both of those distros, DOM is enabled. In such cases, our standard in the past is not to require checks for the extension.
This is mentioned in our [draft coding standards|
http://framework.zend.com/wiki/display/ZFDEV/PHP+Coding+Standard+%28draft%29#PHPCodingStandard%28draft%29-PHPExtensions].