Jump to content

this may be a bug


ljx0517@gmail.com

Recommended Posts

here is my url /api/product_features/?output_format=JSON

i want use webservice fetch all product features,

but this url give me a blank page

 

i debug into source code ,found this 

with WebserviceOutputJSON.php file


public function overrideContent($content)
    {
        $content = '';
        $content .= json_encode($this->content);
        $content = preg_replace("/\\\\u([a-f0-9]{4})/e", "iconv('UCS-4LE','UTF-8',pack('V', hexdec('U$1')))", $content);
        return $content;
    }

 

 in zendstudio display $content

 $content = {"product_features":[{"id":1},{"id":2},{"id":3},{"id":4},{"id":5},{"id":6},{"id":7},{"id":8},{"id":9},{"id":

 10},{"id":11},{"id":12},{"id":13}]}
but after execute 
preg_replace("/\\\\u([a-f0-9]{4})/e", "iconv('UCS-4LE','UTF-8',pack('V', hexdec('U$1')))", $content);

$content became empty.

i'd like to know how to fix this

Edited by [email protected] (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...