summaryrefslogtreecommitdiff
path: root/it_debug.class
diff options
context:
space:
mode:
authorChristian Schneider2009-04-22 12:49:48 +0000
committerChristian Schneider2009-04-22 12:49:48 +0000
commit3ef0c43348c8f735bab740e4a9b7bf8df26fbb00 (patch)
tree93c63c624528a013f0efcad223ac3b49cdf0f13f /it_debug.class
parent414cc575912785ef15e4a26eb002bef1d0f739bf (diff)
downloaditools-3ef0c43348c8f735bab740e4a9b7bf8df26fbb00.tar.gz
itools-3ef0c43348c8f735bab740e4a9b7bf8df26fbb00.tar.bz2
itools-3ef0c43348c8f735bab740e4a9b7bf8df26fbb00.zip
Get rid of ereg/split, replaced by preg equivalents
Diffstat (limited to 'it_debug.class')
-rw-r--r--it_debug.class6
1 files changed, 3 insertions, 3 deletions
diff --git a/it_debug.class b/it_debug.class
index 4b0650a..e1766f3 100644
--- a/it_debug.class
+++ b/it_debug.class
@@ -80,7 +80,7 @@ function srcline($stackoffs = 0)
*/
function dump($args)
{
- if (ereg('(csv|txt|gif|jpg)', $_SERVER['PHP_SELF']))
+ if (preg_match('/csv|txt|gif|jpg/', $_SERVER['PHP_SELF']))
$plain = 1;
else if ($_SERVER['REMOTE_ADDR'])
{
@@ -136,7 +136,7 @@ function dump($args)
{
list (, $head, $classname, $values, $tail) = $regs;
$classname = strtolower($classname);
- $values = preg_replace("#'(\w+)' =>([^\n]+),#", 'var \$$1 = $2;', $values);
+ $values = preg_replace("#'(\w+)' =>\s*([^\n]+),#", 'var \$$1 = $2;', $values);
$item = $head . "class $classname { $values }$tail";
}
@@ -151,7 +151,7 @@ function dump($args)
if (isset($_SERVER['REMOTE_ADDR']) && !$plain)
$item = htmlspecialchars($item);
- if (ereg('^[\'"]', $var))
+ if (preg_match('/^[\'"]/', $var))
$r .= "$item ";
else {
$var = "$blue$var=$noblue";