From 4f178bc34d790d08b2c611a591a6cdb96eb31ee0 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 2 Nov 2009 14:44:57 +0000 Subject: dont overwrite existing array --- it_text.class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'it_text.class') 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']) -- cgit v1.2.3