 +	if (opline->op2.op_type == IS_UNUSED) {
 +		char *tmp = strrchr(ce->name, '~');
 +
++		if (!tmp) {
++			zend_error(E_COMPILE_ERROR, "Cannot import %s which is not contained in a package", ce->name);
++			/* Bails out */
++		}
++            
 +		alias_len = strlen(tmp)- 1;		
 +		alias_name = zend_str_tolower_dup(tmp+ 1, alias_len);
 +	} else {

retrieving revision 1.600
diff -u -r1.600 zend_compile.c
--- Zend/zend_compile.c	16 Oct 2004 23:17:58 -0000	1.600
+++ Zend/zend_compile.c	3 Nov 2004 13:46:03 -0000
@@ -125,7 +125,10 @@
 	zend_stack_init(&CG(foreach_copy_stack));
 	zend_stack_init(&CG(object_stack));

 
 void zend_vm_use_old_executor()
 {
@@ -31129,6 +31220,7 @@
   	ZEND_ASSIGN_DIM_HANDLER,
   	ZEND_ISSET_ISEMPTY_PROP_OBJ_HANDLER,
   	ZEND_HANDLE_EXCEPTION_HANDLER,
