[Html_ajax-svn] [202] improved dependency on http_build_query(), fixed PHP_Compat path

Elizabeth Smith emsmith at elizabethmariesmith.com
Fri Nov 11 13:26:17 CST 2005


Much better, no more fatal errors for me:)

arpad at bluga.net wrote:

> Revision
>     202
> Author
>     arpad
> Date
>     2005-11-11 13:16:44 -0600 (Fri, 11 Nov 2005)
>
>
>       Log Message
>
>improved dependency on http_build_query(), fixed PHP_Compat path
>
>
>       Modified Paths
>
>     * trunk/AJAX/Serializer/Urlencoded.php
>       <#trunkAJAXSerializerUrlencodedphp>
>
>
>       Diff
>
>
>         Modified: trunk/AJAX/Serializer/Urlencoded.php (201 => 202)
>
>--- trunk/AJAX/Serializer/Urlencoded.php	2005-11-11 18:51:44 UTC (rev 201)
>+++ trunk/AJAX/Serializer/Urlencoded.php	2005-11-11 19:16:44 UTC (rev 202)
>@@ -1,9 +1,5 @@
> <?php
> // $Id$
>-if (!function_exists('http_build_query')) {
>-    require_once 'PHP/Compat/functions/http_build_query.php';
>-}
>-
> /**
>  * URL Encoding Serializer
>  *
>@@ -17,9 +13,15 @@
>  */
> class HTML_AJAX_Serialize_Urlencoded
> {
>-    
>     function serialize($input) 
>     {
>+        if (!function_exists('http_build_query')) {
>+            @include_once 'PHP/Compat/Function/http_build_query.php';
>+            if (!function_exists('http_build_query')) {
>+                trigger_error('The URL encoding serializer requires http_build_query(), for information about using this function without upgrading your version of PHP, see: <a href="http://pear.php.net/package/PHP_Compat">http://pear.php.net/package/PHP_Compat</a>', E_USER_WARNING);
>+                return;
>+            }
>+        }
>         return http_build_query(array('_HTML_AJAX' => $input));
>     }
> 
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Html_ajax-svn mailing list
>Html_ajax-svn at lists.bluga.net
>http://lists.bluga.net/mailman/listinfo/html_ajax-svn
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bluga.net/pipermail/html_ajax-svn/attachments/20051111/1bfd6284/attachment.html


More information about the Html_ajax-svn mailing list