Bug 503 - [Chameleon]Using default skins generates PHP errors
: [Chameleon]Using default skins generates PHP errors
Status: CLOSED FIXED
: Chameleon
Widget
: 1.99
: PC Linux
: P2 normal
: 1.99 beta 3
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-07-07 14:03 by
Modified: 2004-10-27 12:51 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-07-07 14:03:09
I commented out the "$oApp->registerSkin( 'skins/sample' );" line in the
"sample_enhanced.phtml" application.  I then loaded this application and got the
PHP errors below.

Fedora Core 1
Mozilla 1.6
Chameleon 20040625

-------------------------
PHP errors:

[07-Jul-2004 13:43:43] PHP Warning:  imagecreatefrompng():
'/home/nsavard/proj/chameleon_beta/samples/htdocs' is not a valid PNG file in
/home/nsavard/proj/chameleon_beta/htdocs/common/buttonizer/buttonizer.php on
line 408
[07-Jul-2004 13:43:43] PHP Warning:  imagecolortransparent(): supplied argument
is not a valid Image resource in
/home/nsavard/proj/chameleon_beta/htdocs/common/buttonizer/buttonizer.php on
line 409
[07-Jul-2004 13:43:43] PHP Warning:  imagesx(): supplied argument is not a valid
Image resource in
/home/nsavard/proj/chameleon_beta/htdocs/common/buttonizer/buttonizer.php on
line 410
[07-Jul-2004 13:43:43] PHP Warning:  imagesy(): supplied argument is not a valid
Image resource in
/home/nsavard/proj/chameleon_beta/htdocs/common/buttonizer/buttonizer.php on
line 411
[07-Jul-2004 13:43:43] PHP Warning:  imagecopy(): supplied argument is not a
valid Image resource in
/home/nsavard/proj/chameleon_beta/htdocs/common/buttonizer/buttonizer.php on
line 438
[07-Jul-2004 13:43:43] PHP Warning:  imagedestroy(): supplied argument is not a
valid Image resource in
/home/nsavard/proj/chameleon_beta/htdocs/common/buttonizer/buttonizer.php on
line 443
[
------- Comment #1 From 2004-07-08 13:26:06 -------
Chnaged target to 1.99 beta 3.
------- Comment #2 From 2004-10-07 10:47:26 -------
fixed in cvs.  The findFile function now returns false immediately if the path
"" is requested.  Button.php detects failure to find requested images and
records an error in the session error handler.  buttonizer.php suppresses errors
finding graphic images and also records an error.

No more php errors should appear in the page.  Instead, the button should be
generated as best as possible and the errorwidget should popup with messages
indicating which images are not found.
------- Comment #3 From 2004-10-25 17:33:41 -------
I commented out the "$oApp->registerSkin( 'skins/sample' );" line in the
"sample_enhanced.phtml" application. Loaded the application and recieved several
errors listed in the error popup widget. These errors all said the same thing.

I commented out the "$oApp->registerSkin( 'skins/sample' );" line in the
"sample_enhanced.phtml" application.

ERROR: Button.php was unable to find the image 'icons/icon_pan_se.png' in any of
the registered or default skins.

I am unsure if this is an ok error since the application cannot find this image.
I error makes sense since the icon_pan_se.png is not found in
/chameleon/htdocs/images/ which I think is looking since a skin is not set.

I have set to reopen to make sure this bug is addressed.
------- Comment #4 From 2004-10-27 08:50:51 -------
this is the expected behaviour.  The default skin does not contain some of the
images used in the sample application (a deliberate design decision to highlight
important aspects of chameleon application development).

All the error messages now appear in the error manager rather than as PHP errors
in the page, which was the desired result of this bug.  The fact that errors
occur is actually normal and expected, it points you to something you have to
fix in the application.
------- Comment #5 From 2004-10-27 08:58:35 -------
since this is the expected result, 

set to verified on windows.
------- Comment #6 From 2004-10-27 12:51:25 -------
Verified on Fedora Core 2.