php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54626 Access to undeclared static property - But it exists
Submitted: 2011-04-28 17:39 UTC Modified: 2011-05-03 12:31 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: kjakobi at goodgamestudios dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.3.6 OS: Debian
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kjakobi at goodgamestudios dot com
New email:
PHP Version: OS:

 

 [2011-04-28 17:39 UTC] kjakobi at goodgamestudios dot com
Description:
------------
I get the following randomly:

PHP Fatal error:  Access to undeclared static property: Ggs\Sns\Uri::$inst

Ggs\Sns\Uri::$inst exists. The error only occurs sometimes. Is there a memory problem or something like that?

Exact Version ist 3.5.6-8 (unstable on debian)

Test script:
---------------
Thats not possible


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-28 17:52 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2011-04-28 17:52 UTC] rasmus@php.net
Could you add the output of print_r(get_loaded_extensions()) to this report?
 [2011-04-28 21:18 UTC] kjakobi at goodgamestudios dot com
-Status: Feedback +Status: Open
 [2011-04-28 21:18 UTC] kjakobi at goodgamestudios dot com
$php -r "print_r(get_loaded_extensions());"
Array
(
    [0] => Core
    [1] => date
    [2] => ereg
    [3] => libxml
    [4] => openssl
    [5] => pcre
    [6] => zlib
    [7] => bcmath
    [8] => bz2
    [9] => calendar
    [10] => ctype
    [11] => dba
    [12] => dom
    [13] => hash
    [14] => fileinfo
    [15] => filter
    [16] => ftp
    [17] => gettext
    [18] => SPL
    [19] => iconv
    [20] => json
    [21] => mbstring
    [22] => pcntl
    [23] => session
    [24] => posix
    [25] => Reflection
    [26] => standard
    [27] => shmop
    [28] => SimpleXML
    [29] => soap
    [30] => sockets
    [31] => Phar
    [32] => exif
    [33] => sysvmsg
    [34] => sysvsem
    [35] => sysvshm
    [36] => tokenizer
    [37] => wddx
    [38] => xml
    [39] => xmlreader
    [40] => xmlwriter
    [41] => zip
    [42] => curl
    [43] => gd
    [44] => imap
    [45] => mcrypt
    [46] => mysql
    [47] => mysqli
    [48] => PDO
    [49] => pdo_mysql
    [50] => suhosin
    [51] => mhash
)
 [2011-04-28 21:23 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2011-04-28 21:23 UTC] rasmus@php.net
Could you check if you can reproduce the problem with suhosin disabled?
 [2011-04-28 21:31 UTC] kjakobi at goodgamestudios dot com
-Status: Feedback +Status: Open
 [2011-04-28 21:31 UTC] kjakobi at goodgamestudios dot com
Yes, tomorrow. But the same code ran fine on 5.3.5 on the same machine.
 [2011-04-28 23:12 UTC] kjakobi at goodgamestudios dot com
Just found out it happens only when using namespaces. Without the namespace I didn't get the error. Also I can say the error occurs ones on ~1000 calls on the file. Really strange.
 [2011-05-01 00:26 UTC] lrtherond at gmail dot com
I see this as well, for me it happens all the time...

I have this code:

---

namespace SquadMixer;


use Glint\CommonMagic\DataFormatter as DataFormatter;
use Glint\CommonMagic\Debugging as Debugging;
use Glint\CommonMagic\GlintException as GlintException;


//{{{ Registrar
class Registrar extends ModelEntity {

    private static $REGISTRATION        = 0;
    private static $UPDATE              = 1;
    private static $PASSWORD_REQUEST    = 2;

...

---

self::$REGISTRATION and self::$UPDATE always work.

self::$PASSWORD_REQUEST always fail with:

PHP Fatal error:  Access to undeclared static property: 
SquadMixer\\Registrar::$PASSWORD_REQUEST

Strangest thing ever...
 [2011-05-01 01:07 UTC] lrtherond at gmail dot com
I take back my report. It was user error in my case. Code on the server was not in 
synch with local repository.
My bad, sorry.
 [2011-05-03 12:31 UTC] cataphract@php.net
-Status: Open +Status: Bogus
 [2011-05-03 12:31 UTC] cataphract@php.net
Closing as bogus.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Nov 26 22:01:33 2024 UTC