summaryrefslogtreecommitdiff
path: root/ext/dba/dba.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2006-03-08 00:43:32 +0000
committerPierre Joye <pajoye@php.net>2006-03-08 00:43:32 +0000
commitbb1ec86f9da24fe6b49bae68353d53ba96b7228f (patch)
tree8a395f4ff82f2bfc5dfbb143231340c80ec3d9e4 /ext/dba/dba.c
parentb7d6d705f1e471544418cf8febb62943ece9e8ce (diff)
downloadphp-git-bb1ec86f9da24fe6b49bae68353d53ba96b7228f.tar.gz
- remove magic_quotes_gpc, magic_quotes_runtime, magic_quotes_sybase
(calling ini_set('magic_....') returns 0|false - get_magic_quotes_gpc, get_magic_quotes_runtime are kept but always return false - set_magic_quotes_runtime raises an E_CORE_ERROR
Diffstat (limited to 'ext/dba/dba.c')
-rw-r--r--ext/dba/dba.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/ext/dba/dba.c b/ext/dba/dba.c
index 43a371ed00..6088a85640 100644
--- a/ext/dba/dba.c
+++ b/ext/dba/dba.c
@@ -474,22 +474,10 @@ static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
DBA_WRITE_CHECK;
- if (PG(magic_quotes_runtime)) {
- len = Z_STRLEN_PP(val);
- v = estrndup(Z_STRVAL_PP(val), len);
- php_stripslashes(v, &len TSRMLS_CC);
- if(info->hnd->update(info, key_str, key_len, v, len, mode TSRMLS_CC) == SUCCESS) {
- efree(v);
- DBA_ID_DONE;
- RETURN_TRUE;
- }
- efree(v);
- } else {
- if(info->hnd->update(info, key_str, key_len, VALLEN(val), mode TSRMLS_CC) == SUCCESS)
- {
- DBA_ID_DONE;
- RETURN_TRUE;
- }
+ if(info->hnd->update(info, key_str, key_len, VALLEN(val), mode TSRMLS_CC) == SUCCESS)
+ {
+ DBA_ID_DONE;
+ RETURN_TRUE;
}
DBA_ID_DONE;
RETURN_FALSE;
@@ -937,9 +925,6 @@ PHP_FUNCTION(dba_fetch)
skip = 0;
}
if((val = info->hnd->fetch(info, key_str, key_len, skip, &len TSRMLS_CC)) != NULL) {
- if (val && PG(magic_quotes_runtime)) {
- val = php_addslashes(val, len, &len, 1 TSRMLS_CC);
- }
DBA_ID_DONE;
RETURN_STRINGL(val, len, 0);
}