File: bug011.phpt

package info (click to toggle)
php-msgpack 2.0.2%2B0.5.7-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,192 kB
  • ctags: 729
  • sloc: ansic: 6,789; xml: 702; php: 18; makefile: 1
file content (16 lines) | stat: -rw-r--r-- 280 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
Bug #011 (Check for segfault with empty array structures)
--FILE--
<?php
	
	$items = array( );
	foreach( range( 0, 1024 ) as $r ) {
		$items[] = array(
			'foo' => array( )
		);
	}
	var_dump( count( msgpack_unpack( msgpack_pack( $items ) ) ) );
	
?>
--EXPECT--
int(1025)