PHP Classes

I think there is a bug in class

Recommend this page to a friend!

      class.upload.php  >  All threads  >  I think there is a bug in class  >  (Un) Subscribe thread alerts  
Subject:I think there is a bug in class
Summary:I think there is a bug in class on line 2637 and 2638
Messages:3
Author:behnamy
Date:2016-01-15 19:16:34
 

  1. I think there is a bug in class   Reply   Report abuse  
Picture of behnamy behnamy - 2016-01-15 19:16:34
Hi, first I should thank you for class.upload.php It's great.

I have a problem in using this class that it returns two error when I turn on error reporting.
I get these errors:

Error: 2 strlen() expects parameter 1 to be string, array given ***** on line 2637 in C:\xampp\htdocs\class.upload.php

Error: 2 sscanf() expects parameter 1 to be string, array given ***** on line 2638 in C:\xampp\htdocs\class.upload.php



and this is my codes:

$handle->image_convert = 'jpg';

$handle->image_crop = $option['crop_percentage'] . '%';


$handle->image_bevel = 5;
$handle->image_bevel_color1 = '#FFFFFF';
$handle->image_bevel_color2 = '#FFFFFF';

$handle->image_overlay_color = $option['color'];
$handle->image_overlay_opacity = $option['color_opacity'];

$handle->image_brightness = $option['brightness'];

$handle->image_contrast = $option['contrast'];

$handle->image_opacity = $option['opacity'];

$handle->image_pixelate = $option['pixelate'];

$handle->image_unsharp = true;

$val_height=(0.1 * $option['reflection_px']);
$handle->image_reflection_height = $val_height;
$handle->image_reflection_space = -20;

// $handle->image_reflection_opacity = $option['reflection_opacity'];

$handle->image_border = 5;
$handle->image_border_color = $option['border_color'];


what is wrong with my code or maybe the problem is from the class's codes? please check it.

  2. Re: I think there is a bug in class   Reply   Report abuse  
Picture of Colin Verot Colin Verot - 2016-01-15 20:55:34 - In reply to message 1 from behnamy
One of your colors must be wrong. Check the log produced by the class.

  3. Re: I think there is a bug in class   Reply   Report abuse  
Picture of behnamy behnamy - 2016-01-16 04:46:46 - In reply to message 2 from Colin Verot
you mean one of these there have problem in it's color?
$handle->image_bevel_color1 = '#FFFFFF';
$handle->image_bevel_color2 = '#FFFFFF';

$handle->image_overlay_color = $option['color'];


_____________________________________________
what do you mean log produced by the class? Is there any internal logger or any method in your class for detecting errors?