View Full Version : Resolved Problem with ImageGD,
Hello!
I'm having a problem with my ImageGD library I created a while ago, it doesn't work when I try on my localhost, but it works when I do it online (http://unlinkthis.net/scripts/imagegd/imagegd.php).
You can view my code here. (http://unlinkthis.net/scripts/imagegd/imagegd.phps)
Thanks for any help given!
techietim
04-09-2009, 07:18 PM
I'm guessing you have WAMP. If you comment out the header function, you'll see it's spitting out the following errors:
Notice: Array to string conversion in C:\wamp\www\gd.php on line 137
Notice: Array to string conversion in C:\wamp\www\gd.php on line 137
Notice: Array to string conversion in C:\wamp\www\gd.php on line 137
Notice: Array to string conversion in C:\wamp\www\gd.php on line 137
Notice: Array to string conversion in C:\wamp\www\gd.php on line 137
Notice: Array to string conversion in C:\wamp\www\gd.php on line 137
Notice: Array to string conversion in C:\wamp\www\gd.php on line 137
Notice: Array to string conversion in C:\wamp\www\gd.php on line 137
Notice: Array to string conversion in C:\wamp\www\gd.php on line 137
Notice: Array to string conversion in C:\wamp\www\gd.php on line 137
That should help you fix your code up.
It didn't really help, I tried changing:
if(strlen($color) == 7 || strlen($color) == 4 && substr($color, 0, 1) == "#"){
To:
if(is_string($color) && strlen($color) == 7 || strlen($color) == 4 && substr($color, 0, 1) == "#"){
But it still gives me the same error. Yes, I am using Wamp.
No body can help me? :(
Solution:
if((strlen((string)$color) == 7 || strlen((string)$color) == 4) && substr((string)$color, 0, 1) == "#"){
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.