Date: 10/27/99
- Next message: ak <email protected>: "Re: [PHPLIB-DEV] error in ct_sql.inc"
- Previous message: Kristian Köhntopp: "[PHPLIB-DEV] Table incompatibility"
- In reply to: ak <email protected>: "[PHPLIB-DEV] error in ct_sql.inc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ak <email protected> wrote:
>
> Hi!
>
> Without special investigation:
>
> My page works fine with ct_sql.inc V1.14.
> With V1.16 I get:
> "Fatal error: Call to unsupported or undefined function () in ct_sql.inc on line 122"
> and nothing else...
if it's not a per-user data, delete the entry in the table so it will
generate
a good entry. Else experiment with this patch [didn't test it]:
(Kris, is that a good start for a backward compatibility support?)
[email protected>?subject=Re:%20[PHPLIB-DEV]%20error%20in%20ct_sql.inc&replyto=381732A7.59E893DA <email protected>">guest <email protected>/devel/php/phplib-7/out/ct_sql.inc.diff2">http://guest:guest <email protected>/devel/php/phplib-7/out/ct_sql.inc.diff2]
--- ct_sql.inc.old Wed Oct 27 18:31:10 1999
+++ ct_sql.inc Wed Oct 27 20:07:54 1999
@@ -111,17 +111,29 @@
# get encoding method from (method:value) pair
$colon_pos = strpos($str,':');
$str_method = substr ( $str , 0 , $colon_pos );
- $str_value = substr ( $str , $colon_pos + 1 );
-
- error_log ( "str_meth :
[$str_method][".$this->enc_methods[$str_method]['dec'].']');
- $str = $this->enc_methods[$str_method]['dec']($str_value);
-
+
+ if ( !isset($this->enc_methods][$str_method]) ) {
+ $this->compat_guess(&$str,&$name);
+ } else {
+ $str_value = substr ( $str , $colon_pos + 1 );
+ $str = $this->enc_methods[$str_method]['dec']($str_value);
+ }
}
return $str;
}
-
+ function compat_guess($str,$name) {
+ $str2 = base64_decode( $str );
+ $colon_pos = strpos ( $str, ':');
+ if ( substr($str2,0,$colon_pos) == $name ) {
+ $str = substr($str,$colon_pos+1);
+ } else {
+ $str2 = stripslashes( $str );
+ $colon_pos = strpos ( $str, ':');
+ $str = substr($str2,$colon_pos+1);
+ }
+ }
function ac_newid($str, $name) {
return $str;
-- CIMPOESU Teodor, Web Programmer@ DIGICOM S.A. Bucharest, Romania @ Internet, site development @ teo <email protected>,+(401)-330.47.28
official home page ~ http://www.digiro.net/ Internet web page ~ http://internet.digiro.net/ - PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>. To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in the body, not the subject, of your message.
- Next message: ak <email protected>: "Re: [PHPLIB-DEV] error in ct_sql.inc"
- Previous message: Kristian Köhntopp: "[PHPLIB-DEV] Table incompatibility"
- In reply to: ak <email protected>: "[PHPLIB-DEV] error in ct_sql.inc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

