Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Warning: implode(): Bad arguments  (Read 7008 times)

0 Members and 1 Guest are viewing this topic.

FTK

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • Trick Kiting website
Warning: implode(): Bad arguments
« on: December 08, 2005, 03:23:00 pm »

anyone ....
I've never had any problems with Coppermine Photo mgmt even till yesterday
a user uploaded 2 times some files.

click on
http://tweelijners.com/gallery/displayimage.php?album=lastup&cat=0&pos=4
Everithing works but on top of the coppermine Gallery
I get
Warning: implode(): Bad arguments. in /home/janwal/public_html/gallery/displayimage.php on line 334
Warning: implode(): Bad arguments. in /home/janwal/public_html/gallery/displayimage.php on line 336

Anyone any idea how this can be solved & how did this error occured after upload?

strange thing is that other uploads work correctly
regards,
J
« Last Edit: December 10, 2005, 12:15:00 pm by Abbas Ali »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Warning: implode(): Bad arguments
« Reply #1 on: December 08, 2005, 04:12:59 pm »

Turn off debug notices in your config settings.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

FTK

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • Trick Kiting website
Re: Warning: implode(): Bad arguments
« Reply #2 on: December 08, 2005, 04:30:54 pm »

thx, I looked it up but debug notices are off
If I turn them on its even worse! I get approx one page of errors
so something is very wrong .....
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Warning: implode(): Bad arguments
« Reply #3 on: December 08, 2005, 04:45:11 pm »

Did your host upgrade PHP?  Ask them if they've done anything lately.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

FTK

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • Trick Kiting website
Re: Warning: implode(): Bad arguments
« Reply #4 on: December 09, 2005, 07:44:25 am »

nothing, host provides automated upgrades (patches)
user has the ability to implemented them as needed/wanted
last upgrade was from 1.3.4 => 1.3.5 a while ago
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Warning: implode(): Bad arguments
« Reply #5 on: December 09, 2005, 08:02:02 am »

not coppermine updates, but php updates!
Logged

FTK

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • Trick Kiting website
Re: Warning: implode(): Bad arguments
« Reply #6 on: December 09, 2005, 08:07:22 am »

checked, non last 1/2 year still php 4.4.0

this is rather new for me, I'm using coppermine sinds end of 2004
Q: I just took a full backup of my website including a seperate one from the mysql DB
suppose I remove everithing, then reinstall coppermine from scratch, then restor
mysql db would everithing work then ok? Is it worth a try?
« Last Edit: December 09, 2005, 08:39:16 am by FTK »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Warning: implode(): Bad arguments
« Reply #7 on: December 09, 2005, 11:30:15 am »

no, what should this be good for?
Logged

Nibbler

  • Guest
Re: Warning: implode(): Bad arguments
« Reply #8 on: December 09, 2005, 12:09:29 pm »

Find the lines it talks about in the file and add an @ just before the word implode on each line.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Warning: implode(): Bad arguments
« Reply #9 on: December 09, 2005, 12:28:38 pm »

Edit displayimage.php

Replace (line 134)
Code: [Select]
if (isset($iptc['Keywords'])) $info[$lang_picinfo['iptcKeywords']] = trim(implode(" ",$iptc['Keywords']));

with
Code: [Select]
if (isset($iptc['Keywords']) && is_array($iptc['Keywords'])) $info[$lang_picinfo['iptcKeywords']] = trim(implode(" ",$iptc['Keywords']));

and Replace (line 336)
Code: [Select]
if (isset($iptc['SubCategories'])) $info[$lang_picinfo['iptcSubCategories']] = trim(implode(" ",$iptc['SubCategories']));

with
Code: [Select]
if (isset($iptc['SubCategories']) && is_array($iptc['SubCategories'])) $info[$lang_picinfo['iptcSubCategories']] = trim(implode(" ",$iptc['SubCategories']));

This should stop showing the above mentioned warninings.


Abbas

[edit]
Removed the parse error.
[/edit]
« Last Edit: December 10, 2005, 09:56:28 am by Abbas Ali »
Logged
Chief Geek at Ranium Systems

FTK

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • Trick Kiting website
Re: Warning: implode(): Bad arguments
« Reply #10 on: December 10, 2005, 09:36:39 am »

dear all,
solution of abbas gives

Parse error: parse error, unexpected T_VARIABLE in /home/janwal/public_html/gallery/displayimage.php on line 334

altough solution of Nibbler (adding the @ befor the implode works perfectly

a question remains (out of curiosity & to understand better)
what caused the errors in the first place .... ?
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Warning: implode(): Bad arguments
« Reply #11 on: December 10, 2005, 09:53:13 am »

Oops, missed one ")" in the code. Modified the code above.

The warnings were coming because of IPTC data of image.
Logged
Chief Geek at Ranium Systems

FTK

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • Trick Kiting website
Re: Warning: implode(): Bad arguments
« Reply #12 on: December 10, 2005, 12:05:03 pm »

indeed works too now
I just looked up IPTC Data,
(http://www.breezesys.com/BreezeBrowser/help/iptc.htm)
I understand why the error occured now
in a way can be seen as a kind of small bug ....
-Case closed-
Many thx!!!
« Last Edit: December 10, 2005, 12:11:18 pm by FTK »
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.