Various fixes for php 32bits and long albums/photos ids
This commit is contained in:
parent
dffce28eb4
commit
0ea5909ea4
@ -16,10 +16,9 @@ final class Response {
|
||||
|
||||
}
|
||||
|
||||
public static function json($str) {
|
||||
|
||||
exit(json_encode($str));
|
||||
|
||||
// JSON_NUMERIC_CHECK ensure the albums/photos ids will be converted from strings to integers
|
||||
public static function json($str, $options = JSON_NUMERIC_CHECK) {
|
||||
exit(json_encode($str, $options));
|
||||
}
|
||||
|
||||
}
|
@ -8,8 +8,8 @@ function generateID() {
|
||||
// Ensure that the id has a length of 14 chars
|
||||
while(strlen($id)<14) $id .= 0;
|
||||
|
||||
// Return the integer value of the id
|
||||
return intval($id);
|
||||
// Return id as a string (32bit php can't handle 14digit integers)
|
||||
return $id;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user