No save of geo date in database.

More
6 years 4 weeks ago #41077 by pieter
Hi,

I have an issue with saving in the database. I have the following on saving in the error log:
Code:
[Thu Mar 22 12:59:37 2018] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Notice: Trying to get property of non-object in /home/name/public_html/plugins/jevents/jevgeocoder/jevgeocoder.php on line 38 [Thu Mar 22 12:59:37 2018] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Notice: Trying to get property of non-object in /home/name/public_html/plugins/jevents/jevgeocoder/jevgeocoder.php on line 38 [Thu Mar 22 12:59:37 2018] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Notice: Trying to get property of non-object in /home/name/public_html/plugins/jevents/jevgeocoder/jevgeocoder.php on line 39 [Thu Mar 22 12:59:37 2018] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Notice: Trying to get property of non-object in /home/name/public_html/plugins/jevents/jevgeocoder/jevgeocoder.php on line 39 [Thu Mar 22 12:59:37 2018] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Notice: Trying to get property of non-object in /home/name/public_html/plugins/jevents/jevgeocoder/jevgeocoder.php on line 52 [Thu Mar 22 12:59:37 2018] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Notice: Trying to get property of non-object in /home/name/public_html/plugins/jevents/jevgeocoder/jevgeocoder.php on line 52 [Thu Mar 22 12:59:37 2018] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Notice: Trying to get property of non-object in /home/name/public_html/plugins/jevents/jevgeocoder/jevgeocoder.php on line 53 [Thu Mar 22 12:59:37 2018] [warn] [client xxx.xxx.xxx.xxx] mod_fcgid: stderr: PHP Notice: Trying to get property of non-object in /home/name/public_html/plugins/jevents/jevgeocoder/jevgeocoder.php on line 53

I am not so much of a php developer but I can read it a little. Something on the $return[xx] is wrong I guess...

I am running PHP 7.0.2, latest of joomla and jevents... it happens on both manual save as well as iCal import...

If you need more info, let me know, if you need me to test any, please do ask.

Tx,

Please Log in or Create an account to join the conversation.

More
6 years 4 weeks ago #41086 by pieter
I found the cause of all. As I have multiple lines of address details loaded into the "locations" in jEvents, it adds either /n or <br /> to the details. The latter html tag is not stripped using only urlencode (somewhere around line 65).
By adding this:
Code:
$location = trim(preg_replace('/<[^>]*>/', ' ', $location));

Before the urlencode it solves it.

It then looks like:
Code:
$db->setQuery($q); $location = $db->loadResult(); $location = trim(preg_replace('/<[^>]*>/', ' ', $location)); $query = urlencode($location);

Please Log in or Create an account to join the conversation.

Time to create page: 0.319 seconds
Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.