summaryrefslogtreecommitdiff
path: root/program/include/rcube_shared.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-05-04 08:31:55 +0000
committeralecpl <alec@alec.pl>2009-05-04 08:31:55 +0000
commit23a2eec4d540b5f971ed6377e7ad776456ee0633 (patch)
tree34081a5830cb6c2c843dbf3b873bf2643400c134 /program/include/rcube_shared.inc
parentdb5abc6c211d78ad80b716ddef11eabe5e32f137 (diff)
- ereg -> preg
Diffstat (limited to 'program/include/rcube_shared.inc')
-rw-r--r--program/include/rcube_shared.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index a05815800..9bbc8299b 100644
--- a/program/include/rcube_shared.inc
+++ b/program/include/rcube_shared.inc
@@ -170,7 +170,7 @@ function json_serialize($var)
foreach ($var as $key => $value)
{
// enclose key with quotes if it is not variable-name conform
- if (!ereg("^[_a-zA-Z]{1}[_a-zA-Z0-9]*$", $key) || is_js_reserved_word($key))
+ if (!preg_match('/^[_a-zA-Z]{1}[_a-zA-Z0-9]*$/', $key) || is_js_reserved_word($key))
$key = "'$key'";
$pairs[] = sprintf("%s%s", $is_assoc ? "$key:" : '', json_serialize($value));