Updated my CMS version from 2.2.8 on PHP version 5.6.24 to 2.2.10 on PHP version 7.2.14
with working mods : CompanyDirectory: 1.23.5 , Postcode: 1.2.1
My storelocator of the CompanyDirectory module doesn't function anymore.
Get Database Error: EXECUTE(1582) - Incorrect parameter count in the call to native function 'radians'
After a var_dump of cd_company_query($filter) (line 302 of action.search.php file in CompanyDirectory)
I see that ["lat"]=> float(52,3464) ["long"]=> float(4,8977) values are both with a comma float instead with a point float.
In version CMS 228 the var_dump gives floatings with a point. In the database the LAT and LONG are stored as double with a point.
This is causing the error that the mysqli function 'radians' is not working. See line 166 class.cd_company_query.php
$str = '(SELECT 3959 * acos(cos(radians('.$coords['lat'].'))
* cos(radians(C.latitude))
* cos(radians(C.longitude) - radians('.$coords['long'].'))
+ sin(radians('.$coords['lat'].'))
* sin(radians(C.latitude)))) AS distance';
How can I solve this problem ?
Overview of complete var_dump :
["_data":"cd_company_filter":private]=> array(16) { ["id"]=> string(2) "cd" ["sortby"]=> string(12) "company_name" ["sortorder"]=> string(3) "asc" ["pagelimit"]=> int(250) ["page"]=> int(1) ["expiredowners"]=> int(0) ["deep"]=> int(1) ["onlycount"]=> int(0) ["inline"]=> int(0) ["showall"]=> int(0) ["matchall"]=> int(1) ["status"]=> int(-1) ["returnid"]=> int(28) ["radius"]=> float(10) ["lat"]=> float(52,3464) ["long"]=> float(4,8977) }
phpversion: 7.2.14
Cms Version: 2.2.10
CompanyDirectory: 1.23.5
Postcode: 1.2.1
CompanyDirectory on CMS 2.2.10 gives 'radians' error
Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Let us know here.
Jump to
- Official Boards
- ↳ README FIRST!!!
- ↳ Announcements
- ↳ General Discussion
- Support Boards
- ↳ CMSMS Core
- ↳ Modules/Add-Ons
- ↳ Help Wanted (commercial)
- ↳ Translations
- Community Boards
- ↳ Tips and Tricks
- ↳ CMS Show Off
- ↳ Layout and Design (CSS & HTML)
- ↳ Feature ideas
- ↳ Developers Discussion
- ↳ The Lounge
- International Discussions
- ↳ Czech/Slovak - Česky/Slovensky
- ↳ Danish - Dansk
- ↳ Dutch - Nederlands
- ↳ Aankondigingen
- ↳ Tips en Trucs
- ↳ Vertalingen & Documentatie
- ↳ Hulp gezocht (commercieel)
- ↳ Finnish - Suomi
- ↳ French - Français
- ↳ German - Deutsch
- ↳ BITTE ZUERST LESEN !!!
- ↳ Ankündigungen
- ↳ Installation und Einstellungen
- ↳ Module und Tags
- ↳ Smarty-Tipps und -Tricks
- ↳ Layout und Design
- ↳ Suchmaschinenoptimierung (SEO)
- ↳ HowTo's
- ↳ Übersetzungen
- ↳ Show Off
- ↳ Hilfe gesucht (kommerziell)
- ↳ Stammtisch
- ↳ Hungarian - Magyar
- ↳ Italian - Italiano
- ↳ Moduli/Plugins
- ↳ Lithuanian - Lietuviškai
- ↳ Darbo / bendradarbiavimo pasiūlymai ir paieška
- ↳ Persian / Farsi
- ↳ Polish - Polski
- ↳ Portuguese - Português
- ↳ Russian - русский
- ↳ Предложения и поиск РАБОТЫ
- ↳ Spanish - Español
- ↳ Swedish - Svenska
- Geekmoot Editions
- ↳ Geekmoot 2016
- ↳ Connections and Conversations
- ↳ Geekmoot 2015
- ↳ Geek Moot 2012
- ↳ Locked: Geek Moot 2010
- Old Forums
- ↳ [locked] CMSMS 2.0 Beta
- ↳ Module Developers
- ↳ Closed Issues
- ↳ [locked] Documentation0ld
- ↳ Suggestions, Modifications & Corrections
- ↳ [locked] CMSMS 1.11 Beta
- ↳ Closed Issues
- ↳ [locked] CMSMS 1.10 Beta
- ↳ Closed Issues
- ↳ [locked] CMSMS 2.2 Beta
- ↳ [locked] CMSMS MLE fork
- ↳ Modules/Addon patchs
- ↳ [locked] Quality Assurance
- ↳ [locked] Accessability and Usability
- ↳ [locked] Documentation
- ↳ Media and presentations about CMSMS
- ↳ [locked] Installation, Setup and Upgrade