Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Fatal error... a PHP version problem
(1 viewing) (1) Guest
Support forum for customers who have purchased JoomSEF 3 (Joomla 1.5 compatible). Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: Fatal error... a PHP version problem

Fatal error... a PHP version problem 14 years, 8 months ago #11863

After the last update this is what I see on my homepage...

Fatal error: Call to undefined function: array_combine() in /plugins/system/joomsef.php on line 322


And surely it depends on my server PHP Version 4.3.9...

In this moment I cannot migrate to another hosting so it would be great if you can give us a workaround or some code hack to keep it alive in the meanwhile...
The topic has been locked.

Re:Fatal error... a PHP version problem 14 years, 8 months ago #11868

  • dajo
  • OFFLINE
  • Posts: 5069
Hello,

I'm sure you can find a PHP4 version of array_combine function in the comments at: cz.php.net/manual/en/function.array-combine.php

Best regards,
ARTIO Support Team
ARTIO Support Team
The topic has been locked.

Re:Fatal error... a PHP version problem 14 years, 8 months ago #11918

I'm sorry, but I'm not a php programmer... so I have some difficulties on understanding such things ; )

here are the lines of joomsef.php plugin:

// Combine arrays - as side effect removes duplicities :)
$hrefs = array_combine($matches[0], $matches[1]);
$replaceFrom = array();
$replaceTo = array();

Please... help :(
The topic has been locked.

Re:Fatal error... a PHP version problem 14 years, 8 months ago #11948

  • dajo
  • OFFLINE
  • Posts: 5069
Hello,

Put the following lines to the beginning of the file:
function array_combine($arr1, $arr2) {
$out = array();
 
$arr1 = array_values($arr1);
$arr2 = array_values($arr2);
 
foreach($arr1 as $key1 => $value1) {
$out[(string)$value1] = $arr2[$key1];
}
 
return $out;
}


That should help.

Best regards,
ARTIO Support Team
ARTIO Support Team
The topic has been locked.

Re:Fatal error... a PHP version problem 14 years, 8 months ago #11965

Well done guys!
It seems to be all right!
If i'll still encounter some problem I'll update this post.
The topic has been locked.
  • Page:
  • 1
User Login Empty