Author: bschussek
Date: 2010-04-29 09:24:51 +0200 (Thu, 29 Apr 2010)
New Revision: 29308

Modified:
   tools/lime/trunk/lib/lime.php
Log:
[lime] fixed segmentation fault when using cmp_ok() (closes #8563)

Modified: tools/lime/trunk/lib/lime.php
===================================================================
--- tools/lime/trunk/lib/lime.php       2010-04-28 19:14:12 UTC (rev 29307)
+++ tools/lime/trunk/lib/lime.php       2010-04-29 07:24:51 UTC (rev 29308)
@@ -291,7 +291,11 @@
    */
   public function cmp_ok($exp1, $op, $exp2, $message = '')
   {
-    eval(sprintf("\$result = \$exp1 $op \$exp2;"));
+    $php = sprintf("\$result = \$exp1 $op \$exp2;");
+    // under some unknown conditions the sprintf() call causes a segmentation 
fault
+    // when placed directly in the eval() call
+    eval($php);
+    
     if (!$this->ok($result, $message))
     {
       $this->set_last_test_errors(array(sprintf("      %s", str_replace("\n", 
'', var_export($exp1, true))), sprintf("          %s", $op), sprintf("      
%s", str_replace("\n", '', var_export($exp2, true)))));

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to