summaryrefslogtreecommitdiff
path: root/ext/dba
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
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')
-rw-r--r--ext/dba/dba.c23
-rw-r--r--ext/dba/tests/dba008.phpt1
-rw-r--r--ext/dba/tests/dba_cdb_make.phpt4
3 files changed, 6 insertions, 22 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);
}
diff --git a/ext/dba/tests/dba008.phpt b/ext/dba/tests/dba008.phpt
index 84a47ba083..0c0e434fd8 100644
--- a/ext/dba/tests/dba008.phpt
+++ b/ext/dba/tests/dba008.phpt
@@ -2,6 +2,7 @@
DBA magic_quotes_runtime Test
--SKIPIF--
<?php
+ die('skip, magic_quotes removed');
require_once('skipif.inc');
die("info $HND handler used");
?>
diff --git a/ext/dba/tests/dba_cdb_make.phpt b/ext/dba/tests/dba_cdb_make.phpt
index 04df9252d8..4f4b747460 100644
--- a/ext/dba/tests/dba_cdb_make.phpt
+++ b/ext/dba/tests/dba_cdb_make.phpt
@@ -1,7 +1,5 @@
--TEST--
DBA CDB_MAKE handler test
---INI--
-magic_quotes_runtime=1
--SKIPIF--
<?php
$handler = 'cdb_make';
@@ -35,4 +33,4 @@ magic_quotes_runtime=1
--EXPECT--
database handler: cdb_make
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"
-string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5" \ No newline at end of file
+string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"