Possible error in amdd.php plugin ("creationDate")

gibilogic
12 years, 5 months ago
As soon as i upgraded from previous version (i think it was 1.0.2) to 1.1.0 i got a fatal error while accessing MobileJoomla backend page.

Fatal error: Call to a member function data() on a non-object in /var/www/(...)/plugins/mobile/amdd.php on line 70

Since i couldn't find anything in the forum, I started debugging and found that in plugins/mobile/amdd.php at line 69 we have:

$element = $xml->document->getElementByPath('creationDate');


and changing it to

$element = $xml->document->getElementByPath('creationdate');


makes everything work.

That's strange, because in amdd.xml you can see that the node is correctly spelled "creationDate".

So i inserted a print_r ( $xml->document) before, and you get this code:

 
[creationDate] => Array
(
[0] => JSimpleXMLElement Object
(
...
[_name] => creationdate
...
)
 


Like: the element "_name" is all lowercase.

Does it happen only on my server?
dryabov
12 years, 5 months ago
Maybe it depends on PHP version. Seems in this case reasonable to use lowercase in xml too. Thank you!

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.