kvz / cakephp-rest-plugin

Discontinued: recent cakephp versions overlap functionality, there also is @ceeram's plugin. Painless REST server Plugin for CakePHP
http://kvz.io/blog/2010/01/13/cakephp-rest-plugin-presentation/
169 stars 37 forks source link

Fix for strict standard in PHP 5.4 & HTML Entities #29

Closed tabaresjc closed 11 years ago

tabaresjc commented 11 years ago

Hi!

When I started using CakePHP 2.3 with the plugin, I saw errors related to PHP Strict Standard for the Class RestComponent in Controller/Component/RestComponent.php. These are fixed by re factoring the 5 functions in order to comply with the expected declaration of the Plugin set by CakePHP Core.

Another issue that I found, is when I request a resource in xml, /server/resource.xml, and if the data contains html entities, like laquo and raquo, (also there are japanese UTF8 parsed as html entities string in my data), the Plugin launch an error stating that these are invalid entites.

I solved this issue by decoding html entities before saving into xml document that will be finally shown in the http response

kvz commented 11 years ago

Thanks!

tabaresjc commented 11 years ago

You'r welcome :)

Glad I could help

On Thu, Aug 8, 2013 at 5:28 PM, Kevin van Zonneveld < notifications@github.com> wrote:

Thanks!

— Reply to this email directly or view it on GitHubhttps://github.com/kvz/cakephp-rest-plugin/pull/29#issuecomment-22309525 .