1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

file_get_contents error

Discussion in 'Development' started by armagadon159753, Feb 12, 2018.

  1. Flavius12

    Flavius12 Spider Jockey

    Messages:
    32
    GitHub:
    flavius12
    Try to consider $json as array. Replace $json->hostname with $json["hostname"] and see what happens
     
  2. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    PHP:
    string(24""
    string length is 24, yet empty?
     
  3. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    var_dump() shows a stdClass, and now you're asking him to use it as an array?
     
    Flavius12 and Muqsit like this.
  4. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Does it happen after a good amount of time?

    Free usage of our API is limited to 1,000 API requests per day. If you exceed 1,000 requests in a 24 hour period we'll return a 429 HTTP status code to you.

    I think you may be json_decoding an error and that's why facing the non-existing property error. There seems to be nothing wrong as per the information you provided.
     
  5. armagadon159753

    armagadon159753 Zombie

    Messages:
    217
    GitHub:
    armagadon159753
    PHP:
    [16:35:41] [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\player\PlayerJoinEvent' to 'PlayerLoggerInfo v1'Cannot use object of type stdClass as array on ArmTheDev\ArmTheDev            [16:35:41] [Server thread/CRITICAL]: Error"Cannot use object of type stdClass as array" (EXCEPTIONin "PlayerLoggerInfo_v1/src/ArmTheDev/ArmTheDev" at line 42                                      

    [16:35:41] [Server thread/DEBUG]: #0 src/pocketmine/plugin/MethodEventExecutor(38): ArmTheDev\ArmTheDev->onPlayerJoin(pocketmine\event\player\PlayerJoinEvent object)                                       [
     
  6. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    undo
     
  7. Flavius12

    Flavius12 Spider Jockey

    Messages:
    32
    GitHub:
    flavius12
    Oh lol, I confused a C programming language feature related to structures with PHP :facepalm:
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.