I have installed on Drupal taxonomy_vtn release 6.2 6.x-1.0-rc1
When I am accesing taxonomy_vtn page,iI am getting this error

warning: ksort() expects parameter 2 to be long, string given in
/var/www/vhosts/---/httpdocs/modules/taxonomy_vtn/taxonomy_vtn.pages.inc on line 61.

Comments

tomaszx’s picture

Assigned: Unassigned » tomaszx
Status: Active » Postponed (maintainer needs more info)

Hi,

Look in line 61:

        ksort($arr, SORT_LOCALE_STRING);

where we see string type? is constans only.

Tell me what is your version of php and apache?

greekman’s picture

I completely agree to your argument,
I suspect old version of PHP on my hosting
PHP Version 4.3.9
Apache/2.0.52
Though,hoster annonced PHP5 before,their techical support reply always with excuse "PHP4 is a global on our server"
But I can't move to another hoster,at least not soon.

tomaszx’s picture

look here:
http://pl2.php.net/manual/en/function.setlocale.php

and here:
http://pl2.php.net/manual/en/function.sort.php

Look:
SORT_LOCALE_STRING - compare items as strings, based on the current locale. Added in PHP 4.4.0 and 5.0.2. Before PHP 6, it uses the system locale, which can be changed using setlocale(). Since PHP 6, you must use the i18n_loc_set_default() function.

This look like php < 4.4 is not supported in this things.
I must create dependencies for my module for php version. Thanks for info.

You can probably set php5 n your hosting but in .htaccess file - maybe.

Good luck.
Regards.

greekman’s picture

I found somewhere this code

if (!defined('SORT_LOCALE_STRING')) { // PHP < 4.4.0 - TODO: remove in 2.0
define('SORT_LOCALE_STRING', SORT_STRING);
}

I pasted in the top of taxonomy_vtn.module

And for me it works now.

tomaszx’s picture

but work setlocale for you? proper order? whats language?
thanks for info.

tomaszx’s picture

Status: Postponed (maintainer needs more info) » Fixed

I add rc2 release.
This should detect your version of php and turn off setlocale support.
Should be no more errors.

Regards.

greekman’s picture

Thanks a lot,in my case I dont need setlocale support.
Thanks for codework of your module.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.