Tustin / cod-php

An API wrapper for Call of Duty's Companion App API.
MIT License
1 stars 2 forks source link

Client.php Error #3

Open hadouken111 opened 5 years ago

hadouken111 commented 5 years ago

Hello, I tried your API Wrapper, with your "Full code example" is it does not work when I look at the logs errors it returns the following error: PHP Parse error: syntax error, unexpected ':', expecting ' ; ' or '{' in Client.php on line 73

Can you help me please, I would really like to test your API which looks really cool

hadouken111 commented 5 years ago

Can somebody help me please ? :D @Tustin

Tustin commented 5 years ago

@hadouken111 You will need to update your PHP version to 7.2 since I use newer features.

hadouken111 commented 5 years ago

@Tustin Thanks for an answer, I already changed my version of PHP in 7.2, the problem comes from my .htaccess file, I corrected the problem this problem is fixed now thank :)

On the other hand I have a new error here is the log file if it can help you find my mistake

**PHP Notice: Undefined property: stdClass::$matches in vendor/tustin/cod-php/src/Api/AbstractMode.php on line 53

PHP Warning: Invalid argument supplied for foreach() in vendor/tustin/cod-php/src/Api/AbstractMode.php on line 55

PHP Notice: Undefined property: stdClass::$mp in vendor/tustin/cod-php/src/Api/AbstractMode.php on line 34

PHP Fatal error: Uncaught TypeError: Return value of CallOfDuty\Api\AbstractMode::stats() must be an object, null returned in vendor/tustin/cod-php/src/Api/AbstractMode.php:37

Stack trace:

0 vendor/tustin/cod-php/src/Api/Game/BlackOps4/Zombies/Mode.php(49): CallOfDuty\Api\AbstractMode->stats()

1 login.php(35): CallOfDuty\Api\Game\BlackOps4\Zombies\Mode->prestige()

2 {main}

thrown in vendor/tustin/cod-php/src/Api/AbstractMode.php on line 37**