static void zend_ssa_unlink_block(zend_op_array *op_array, zend_ssa *ssa, zend_basic_block *block, int block_num)
{
- if (block->predecessors_count && ssa->blocks[block_num].phis == NULL) {
+ if (block->predecessors_count == 1 && ssa->blocks[block_num].phis == NULL) {
int *predecessors, i;
ZEND_ASSERT(block->successors_count == 1);
--- /dev/null
+--TEST--
+Incorrect empty basic block elimination
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+class A {
+ public static function test($args = array()) {
+ if (!function_exists( 'stream_socket_client'))
+ return false;
+
+ $is_ssl = isset( $args['ssl'] ) && $args['ssl'];
+
+ if ($is_ssl) {
+ if (!extension_loaded( 'openssl'))
+ return false;
+ if (!function_exists('openssl_x509_parse'))
+ return false;
+ }
+
+ return apply_filters('use_streams_transport', true, $args);
+ }
+}
+?>
+OK
+--EXPECT--
+OK