summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2009-11-02 14:44:57 +0000
committerUrban Müller2009-11-02 14:44:57 +0000
commit4f178bc34d790d08b2c611a591a6cdb96eb31ee0 (patch)
tree7297632f58791f62ca3cd6a9b94a787ab6bf4b73
parentd8da0d3bca055c67ca0824fb0ed76bbae7cc10dc (diff)
downloaditools-4f178bc34d790d08b2c611a591a6cdb96eb31ee0.tar.gz
itools-4f178bc34d790d08b2c611a591a6cdb96eb31ee0.tar.bz2
itools-4f178bc34d790d08b2c611a591a6cdb96eb31ee0.zip
dont overwrite existing array
-rw-r--r--it_text.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it_text.class b/it_text.class
index 1334c88..54bc779 100644
--- a/it_text.class
+++ b/it_text.class
@@ -87,9 +87,9 @@ function it_text($p = array())
$this->initlang(it::match('\.([a-z]{2})\.[^./]+$', $_SERVER['PHP_SELF']), "setting language from url override");
$this->initlang($p['forcelanguage'], "setting language from programmer override");
- # Sample usage of text labels
+ # Create empty array to activate sampling; dont kill any existing one
if (!it::is_live() || rand(1, 100) == 1)
- $GLOBALS['it_text_sampling'] = array();
+ $GLOBALS['it_text_sampling'] = (array)$GLOBALS['it_text_sampling'];
# Make this object available under $GLOBALS['it_text'], or add my texts to $GLOBALS['it_text'] if it exists
if ($p['global'])