Keyword

Warning: explode() expects parameter 2 to be string...

  • Mark Canham
  • Mark Canham's Avatar Topic Author
  • Offline
  • New Member
More
14 years 4 months ago #83455 by Mark Canham
Hi,  This is my first post, so first things first, Hello.
I'm not sure if this is a bug or not, but I was not sure where else to put it. With php error display on I am getting the following errors when viewing an item, or a category list.

Warning: explode() expects parameter 2 to be string, array given in /home/mark/WebSites/pech/components/com_k2/helpers/route.php on line 73 Warning: Invalid argument supplied for foreach() in /home/mark/WebSites/pech/components/com_k2/helpers/route.php on line 74

And when logged in and clicking on My Page, i get a 404 and the same error message.

lines 73 and 74 of route.php are:
73.        $items = explode(',', $params->get('SEFReplacements'));
74.        foreach ($items as $item) {


I added in print_r($params->get('SEFReplacements')); to have a look at what the array was to try and get an idea of what the problem was.  The data in the array doesn't seems to be strings, for example:  [0] => Å  [1] => S, Å’ [2] => O, Ž .

I'm running this development environment on a LAMP server installed on Ubuntu 10.04 desktop.

I've had a search here and on google and cannot find any other instances of this, so I am thinking it must be a problem with my server config or something. I've attached and html file of my phpinfo() so hopefully someone will be able to point me in the right direction.

Thanks in advance...

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

  • Mark Canham
  • Mark Canham's Avatar Topic Author
  • Offline
  • New Member
More
14 years 4 months ago #83456 by Mark Canham
I've created a new instance of Joomla + K2 and set it pretty much identically to the original, checking all they way to see what may have caused the issue. Of course the new instance is working fine! So I've no idea what caused the issue :(, some kind to database corruption?

As I'm only really at the start of this project its not going to be a problem to ditch the old instance and move on.

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

More
14 years 1 month ago #83457 by Trung Chu Huu
Replied by Trung Chu Huu on topic Warning: explode() expects parameter 2 to be string...
Hi mate,

Very simple: login to back-end of your site, go to K2 component, click to Parameters button ( on right side) and click Save button.

Check your site again. wow Notice disappeared :))

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

More
14 years 1 month ago #83458 by Dylan James
Great, that really was a simple fix! Thanks.

Trung Chu Huu said:Hi mate,
Very simple: login to back-end of your site, go to K2 component, click to Parameters button ( on right side) and click Save button.

Check your site again. wow Notice disappeared :))

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

More
14 years 3 weeks ago #83459 by Lester Arévalo
Replied by Lester Arévalo on topic Warning: explode() expects parameter 2 to be string...
thank you very much, that was excellent

Trung Chu Huu said:Hi mate,
Very simple: login to back-end of your site, go to K2 component, click to Parameters button ( on right side) and click Save button.

Check your site again. wow Notice disappeared :))

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

More
14 years 3 weeks ago #83460 by himple
great great great !
How did you manage to do that ?

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

  • Peter
  • Peter's Avatar
  • Offline
  • New Member
  • Imagination is your only limitation
More
13 years 8 months ago #83461 by Peter
Just fixed the same error that appeared on our server after we had upgraded our PHP version from 5.2.x to 5.3.4

 

Resaving the parameters fixed the issue.

Imagination is your only limitation

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


Powered by Kunena Forum