在反序列化序列化数据时出现此错误
unserialize():偏移量0为1个字节时出错
这是我的代码
$subcategorylisting = DB::table('subcategoryorders')->where('category_id',$category->id)->pluck('product_orderid');
$serialize_products = unserialize($subcategorylisting[0]);
$subcategorylisting = isset($subcategorylisting[0]) ? $subcategorylisting[0]:false;
if(isset($subcategorylisting)){
$serialize_products = unserialize($subcategorylisting[0]);
$serialize_productsS=implode(",",$serialize_products);
$productlisting = \App\Productlisting::orderby(DB::raw('FIELD(id,'.$serialize_productsS.')'))->get();
}