Luracast / Restler

Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and/or RESTful API
http://luracast.com/products/restler/
GNU Lesser General Public License v2.1
1.36k stars 315 forks source link

[BUGFIX] don't try to resolve primitive dataType as PHP-class #576

Closed soda-2005 closed 7 years ago

soda-2005 commented 7 years ago

Hi, i have found a bug in method Luracast\Restler\Scope::resolve($className, array $scope)

The method get a string, which should represent a PHP-class. I can't say why, but in fact, the method is called with string-values like 'integer', 'string' or 'array'...so restler 'think' it must resolve a PHP-class, but it currently also try to resolve primitive dataTypes.

The bug seems to not be critical. But in my case (we use restler in combination with the TYPO3-CMS) the bug is critical, because the bug results in a lot of (needless) 'TYPO3-Caching-Requests' (because TYPO3 cache infos about PHP-classes in a file-based cache), which resulted in pure performance and crashed some REST-API-calls.

Arul- commented 7 years ago

Agreed! Thanks 👍