thobbs / phpcassa

PHP client library for Apache Cassandra
thobbs.github.com/phpcassa
MIT License
248 stars 78 forks source link

CompositeType::pack() modifies array in list() execution #99

Closed glenkim closed 12 years ago

glenkim commented 12 years ago

In the pack() method of phpcassa\DataType\CompositeType, the list() construct is used in the following manner:

list($item, $inclusive) = $item;

Per http://php.net/manual/en/function.list.php,

Warning: Modification of the array during list() execution (e.g. using list($a, $b) = $b) results in undefined behavior.

While the line of code seems to work for now, the code could break without notice in other versions of PHP.

thobbs commented 12 years ago

Fixed, thanks!