Long integers as array keys are bugged on Linux 32bit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
BeBot |
Fix Released
|
High
|
DJKRose |
Bug Description
As described in http://
$test_array = array(
0xcc5c4600 => 1,
0xce331a00 => 1,
0xce359000 => 1);
print_r(
Result:
Array
(
[-2147483648] => 1
)
Long int array keys are used for the AoC protocol fix in AOChat.php:
define(
[...]
array(
RPC_TERRITORY_INIT => array("
[...]
People, who are using the patch already, reported this problem here:
http://
The problem results in not being able to connect to AoC at all, so it has high importance, if not critical.
Changed in bebot: | |
assignee: | nobody → DJKRose (dj-krose) |
Changed in bebot: | |
status: | Fix Committed → Fix Released |
There are two ways to solve this: RPC_UNIVERSE_ INIT => array(" name"=> "Login Init", "args"=>"SSI"),
- Raise the minimum requirements of BeBot to php 5.3
- Write a workaround (i.e. an ugly hack), which looks like that:
(string)
I'm going to implement that workaround, because php 5.3 is fairly new and not widely used. But for the benefit of having clean code we shouldn't leave the workaround in the code too long, but think of raising the minimum php requiriments to 5.3 in a later version, maybe 0.7 or so... What do you think?