Home » XML » XML_NITF » Bug #3084
getDocData('copyright') returns null
Details
| Submitted | 2005-01-03 17:49 UTC |
|---|---|
| From | brian at onlineinfo dot net |
| Assigned | polone |
| Status | Closed |
| Package | XML_NITF |
| PHP Version | 4.3.10 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-01-03 17:49 UTC] brian at onlineinfo dot net
Description:
------------
getDocData('copyright') returns null.
the m_kDocData property has no 'copyright' index.
the copyright holder is, however, assigned to property m_sCopyright.
Reproduce code:
---------------
reproduce:
$nitf =& new_nitf($file);
$copyright = $nitf->getDocData('copyright');
Patch:
--- /usr/local/lib/php/XML/NITF.php 2004-12-30 12:13:11.000000000 -0500
+++ pear/XML/NITF.php 2005-01-03 12:31:22.000000000 -0500
@@ -450,6 +450,7 @@
case 'DOC.COPYRIGHT':
$this->m_sCopyright = $kAttrib['HOLDER'];
+ $this->m_kDocData['copyright'] =& $this->m_sCopyright;
break;
case 'MEDIA':
Expected result:
----------------
I expect to see the 'holder' attribute of 'doc.copyright' element returned by $nitf->getDocData('copyright').
Actual result:
--------------
Actual result:
null is returned by $nitf->getDocData().