isset, return and is this a potential PHP 4.3.2 bug?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Phil Powell

    isset, return and is this a potential PHP 4.3.2 bug?

    [PHP]
    class MyClass {

    var $isSQLFieldArra y = array();

    function MyClass() {}

    function getISSQLFieldAr ray($field) {
    if ($field) return $this->isSQLFieldArra y[$field];
    }

    }
    [/PHP]

    If I use this exact class and method in my script, the page that calls
    it locks up. Even using [PHP]error_reporting (E_ALL);[/PHP] not only
    produces NOT ONE ERROR/WARNING/ANYTHING, the page STILL locks up
    cold!! You can't click onto a link or press a form button and go
    ANYWHERE AT ALL...

    However, if I do this:

    [PHP]
    class MyClass {

    var $isSQLFieldArra y = array();

    function MyClass() {}

    function getIsSQLFieldAr ray($field) {
    if ($field && isset($this->isSQLFieldArra y[$field])) return
    $this->isSQLFieldArra y[$field];
    }

    }
    [/PHP]

    Everything works just fine and STILL no errors reported by
    [PHP]error_reporting (E_ALL);[/PHP]

    What do you all make of this one? The following URLs provided me no
    information:




    Phil
  • Chung Leong

    #2
    Re: isset, return and is this a potential PHP 4.3.2 bug?

    Works fine here.

    Uzytkownik "Phil Powell" <soazine@erols. com> napisal w wiadomosci
    news:1cdca2a7.0 402250936.61157 b83@posting.goo gle.com...[color=blue]
    > [PHP]
    > class MyClass {
    >
    > var $isSQLFieldArra y = array();
    >
    > function MyClass() {}
    >
    > function getISSQLFieldAr ray($field) {
    > if ($field) return $this->isSQLFieldArra y[$field];
    > }
    >
    > }
    > [/PHP]
    >
    > If I use this exact class and method in my script, the page that calls
    > it locks up. Even using [PHP]error_reporting (E_ALL);[/PHP] not only
    > produces NOT ONE ERROR/WARNING/ANYTHING, the page STILL locks up
    > cold!! You can't click onto a link or press a form button and go
    > ANYWHERE AT ALL...
    >
    > However, if I do this:
    >
    > [PHP]
    > class MyClass {
    >
    > var $isSQLFieldArra y = array();
    >
    > function MyClass() {}
    >
    > function getIsSQLFieldAr ray($field) {
    > if ($field && isset($this->isSQLFieldArra y[$field])) return
    > $this->isSQLFieldArra y[$field];
    > }
    >
    > }
    > [/PHP]
    >
    > Everything works just fine and STILL no errors reported by
    > [PHP]error_reporting (E_ALL);[/PHP]
    >
    > What do you all make of this one? The following URLs provided me no
    > information:
    >
    > http://us4.php.net/isset
    > http://us4.php.net/return
    >
    > Phil[/color]


    Comment

    Working...