php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28013 using java get*() in a switch statement
Submitted: 2004-04-15 17:35 UTC Modified: 2004-04-15 19:12 UTC
From: pcarmody at c-spanarchives dot org Assigned:
Status: Not a bug Package: Java related
PHP Version: 4.3.4 OS: Solaris 8
Private report: No CVE-ID: None
 [2004-04-15 17:35 UTC] pcarmody at c-spanarchives dot org
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-15 19:12 UTC] sniper@php.net
See the other Java related bugs. (This extension is not supported anymore)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC