From: pcarmody at c-spanarchives dot org
Operating system: Solaris 8
PHP version: 4.3.4
PHP Bug Type: Java related
Bug description: using java get*() in a switch statement
Description:
------------
When using the auto-JavaBean style access to member variables in a switch
statement causes a core dump. Specifying the method name directly avoids
this problem.
Reproduce code:
---------------
Java class:
public class Blah {
private int blah;
public Blah() {
this.blah = 1;
}
public int getBlah() {
return this.blah;
}
}
PHP call:
<?php
$blah = new Java( "Blah" );
switch ( $blah->blah ) {
case 1:
break;
}
?>
Expected result:
----------------
Exits normally.
Actual result:
--------------
A core dump.
If you replace $blah->blah with $blah->getBlah() the code will work
correctly.
--
Edit bug report at http://bugs.php.net/?id=28013&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28013&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28013&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28013&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28013&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28013&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28013&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28013&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28013&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28013&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28013&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28013&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28013&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28013&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28013&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28013&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28013&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28013&r=float