Welcome, Guest
Username Password: Remember me

Possible error in amdd.php plugin ("creationDate")
(1 viewing) (1) Guest
  • Page:
  • 1

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

Possible error in amdd.php plugin ("creationDate") 12 years, 5 months ago #10127

  • gibilogic
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
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?

Re: Possible error in amdd.php plugin ("creationDate") 12 years, 5 months ago #10128

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
Maybe it depends on PHP version. Seems in this case reasonable to use lowercase in xml too. Thank you!
  • Page:
  • 1
Time to create page: 0.14 seconds

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.