@@ -219,13 +219,13 @@ protected function appendSuffix($url)
219219 public function jsonSerialize ()
220220 {
221221 return array (
222- 'itemCount ' => $ this ->itemCount ,//总记录数
223- 'currentPage ' => $ this ->currentPage ,//当前页码
224- 'offset ' => $ this ->offset , //数据库查询的偏移量(查询开始的记录)
225- 'pageSize ' => $ this ->pageSize ,//每页显示记录数
226- 'pageCount ' => $ this ->pageCount ,//总页数
227- 'prevPage ' => $ this ->prevPage ,//当前的上一页码
228- 'nextPage ' => $ this ->nextPage ,//当前的下一页码
222+ 'itemCount ' => intval ( $ this ->itemCount ) ,//总记录数
223+ 'currentPage ' => intval ( $ this ->currentPage ) ,//当前页码
224+ 'offset ' => intval ( $ this ->offset ) , //数据库查询的偏移量(查询开始的记录)
225+ 'pageSize ' => intval ( $ this ->pageSize ) ,//每页显示记录数
226+ 'pageCount ' => intval ( $ this ->pageCount ) ,//总页数
227+ 'prevPage ' => intval ( $ this ->prevPage ) ,//当前的上一页码
228+ 'nextPage ' => intval ( $ this ->nextPage ) ,//当前的下一页码
229229 );
230230 }
231231
@@ -234,7 +234,7 @@ public function __get($name)
234234 $ this ->init ();
235235 switch ($ name ) {
236236 case 'limit ' :
237- return $ this ->offset . ', ' . $ this ->pageSize ;
237+ return intval ( $ this ->offset ) . ', ' . intval ( $ this ->pageSize ) ;
238238 default :
239239 return $ this ->$ name ;
240240 }
0 commit comments