Warning: implode(): Bad arguments Warning: implode(): Bad arguments
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Warning: implode(): Bad arguments

Started by FTK, December 08, 2005, 03:23:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FTK

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

kegobeer

Turn off debug notices in your config settings.
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

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 .....

kegobeer

Did your host upgrade PHP?  Ask them if they've done anything lately.
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

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

Joachim Müller

not coppermine updates, but php updates!

FTK

#6
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?

Joachim Müller


Nibbler

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

Abbas Ali

#9
Edit displayimage.php

Replace (line 134)

if (isset($iptc['Keywords'])) $info[$lang_picinfo['iptcKeywords']] = trim(implode(" ",$iptc['Keywords']));


with

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


and Replace (line 336)

if (isset($iptc['SubCategories'])) $info[$lang_picinfo['iptcSubCategories']] = trim(implode(" ",$iptc['SubCategories']));


with

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]
Chief Geek at Ranium Systems

FTK

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 .... ?

Abbas Ali

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

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

FTK

#12
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!!!