Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Visibility bug

Comments in 'Plugin Development' started by PEMapModder, Dec 24, 2014.

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Can someone please explain why I can't access my own private property?
    http://crash.pocketmine.net/view/614697

    PocketMine => My plugin command executor => eval() => var_dump() => __debugInfo()
  2. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    eval()?
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Yep.
    Issue command `/eval var_dump($object);`
    =>
    PocketMine fires $command->execute($player, $label, ["var_dump(\$object);"]);
    =>
    Plugin calls eval("var_dump(\$object);");
    =>
    PHP calls $object->__debugInfo()
    =>
    code in the crash report
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Nobody to help :(
  5. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    because some of us literally have no idea about it.
    Falk likes this.
  6. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    @PEMapModder PHP is a language that you have to work around, it doesn't work around you. PHP is riddled with bugs like this and it sucks, but that is just how PHP works.
    PEMapModder likes this.
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I'm wondering if it is the fault of eval(), the fault of __debugInfo() or them together.
  8. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    eval() would be my guess.
    PEMapModder likes this.

Share This Page

Advertisement