[svn:PHP-Sandwich] rev 1421 - PHP-Sandwich/trunk

[email protected] 28 Jul 2005 16:48:56 -0000
Newsgroups perl.php.sandwich.dev
Message-ID <[email protected]>
Author: gschlossnagle
Date: Thu Jul 28 09:48:56 2005
New Revision: 1421

Modified:
   PHP-Sandwich/trunk/phpinterp.c
Log:
if they arent a SvPV, then just truncate them

Modified: PHP-Sandwich/trunk/phpinterp.c
==============================================================================
--- PHP-Sandwich/trunk/phpinterp.c	(original)
+++ PHP-Sandwich/trunk/phpinterp.c	Thu Jul 28 09:48:56 2005
@@ -40,7 +40,7 @@ static int sandwich_sapi_ub_write(const 
     FREETMPS;
     LEAVE;
   } else {
-    if(SvROK(oh) && SvTYPE(SvRV(oh)) == SVt_NULL) {
+    if(SvROK(oh) && !SvPOK(SvRV(oh))) {
       sv_setpvn_mg(SvRV(oh), str, str_length);
     } else {
       sv_catpvn_mg(SvROK(oh)?SvRV(oh):oh, str, str_length);