blonkm / schoology-improved

Using the Schoology API to do things you can't using the web version
https://blonkm.github.io/schoology-improved/
3 stars 0 forks source link

integer overflow for array keys #47

Closed blonkm closed 4 years ago

blonkm commented 4 years ago

ids in schoology are large numbers, that cannot fit in a 32-bit array index (on php32). So we're fine on php64 which has a PHP_MAX_INT of 2^63=9223372036854775807 but on php32 it is 2^31=2147483647

an example is the section id: 2181865028, but also the user ids and assignment ids.

So we need to convert all those to string internally, and also rebuild the sqlite database, since all results already have the keys in there stored as (possibly incorrect) integers.