PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » XML » XML_NITF » Bug #3084

getDocData('copyright') returns null

Details

Submitted2005-01-03 17:49 UTC
Frombrian at onlineinfo dot net
Assignedpolone
StatusClosed
PackageXML_NITF
PHP Version4.3.10
OSLinux
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().