Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/avro/datum.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ static function float_to_int_bits($float)
*/
static function double_to_long_bits($double)
{
return pack('d', (double) $double);
return pack('d', (float) $double);
}

/**
Expand Down Expand Up @@ -1014,7 +1014,7 @@ static public function int_bits_to_float($bits)
static public function long_bits_to_double($bits)
{
$double = unpack('d', $bits);
return (double) $double[1];
return (float) $double[1];
}

/**
Expand Down Expand Up @@ -1060,7 +1060,7 @@ public function read_null() { return null; }
*/
public function read_boolean()
{
return (boolean) (1 == ord($this->next_byte()));
return (bool) (1 == ord($this->next_byte()));
}

/**
Expand Down