Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobocoder <anthon.pang@gmail.com>2010-07-31 07:47:23 +0400
committerrobocoder <anthon.pang@gmail.com>2010-07-31 07:47:23 +0400
commite192d0b2ffaac97e75c7348102aea663ac250528 (patch)
tree288d3457f830b5acb7d6d06856b4992df7525a1b /libs/Zend/Log/Writer
parentf75704a6e634d40f9bfb69b9339274366fb34ca1 (diff)
fixes #1539 - on second thought, I'll copy Uri.php and Http/Client.php, and comment out the offending code
git-svn-id: http://dev.piwik.org/svn/trunk@2833 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'libs/Zend/Log/Writer')
-rw-r--r--libs/Zend/Log/Writer/Abstract.php14
-rw-r--r--libs/Zend/Log/Writer/Db.php18
-rw-r--r--libs/Zend/Log/Writer/Syslog.php4
-rw-r--r--libs/Zend/Log/Writer/ZendMonitor.php14
4 files changed, 28 insertions, 22 deletions
diff --git a/libs/Zend/Log/Writer/Abstract.php b/libs/Zend/Log/Writer/Abstract.php
index 80b939db18..b3e244ba0e 100644
--- a/libs/Zend/Log/Writer/Abstract.php
+++ b/libs/Zend/Log/Writer/Abstract.php
@@ -17,7 +17,7 @@
* @subpackage Writer
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $
+ * @version $Id: Abstract.php 22632 2010-07-18 18:30:08Z ramon $
*/
/** Zend_Log_Filter_Priority */
@@ -29,7 +29,7 @@
* @subpackage Writer
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $
+ * @version $Id: Abstract.php 22632 2010-07-18 18:30:08Z ramon $
*/
abstract class Zend_Log_Writer_Abstract implements Zend_Log_FactoryInterface
{
@@ -56,6 +56,12 @@ abstract class Zend_Log_Writer_Abstract implements Zend_Log_FactoryInterface
$filter = new Zend_Log_Filter_Priority($filter);
}
+ if (!$filter instanceof Zend_Log_Filter_Interface) {
+ /** @see Zend_Log_Exception */
+ // require_once 'Zend/Log/Exception.php';
+ throw new Zend_Log_Exception('Invalid filter provided');
+ }
+
$this->_filters[] = $filter;
}
@@ -83,7 +89,7 @@ abstract class Zend_Log_Writer_Abstract implements Zend_Log_FactoryInterface
* @param Zend_Log_Formatter_Interface $formatter
* @return void
*/
- public function setFormatter($formatter)
+ public function setFormatter(Zend_Log_Formatter_Interface $formatter)
{
$this->_formatter = $formatter;
}
@@ -106,7 +112,7 @@ abstract class Zend_Log_Writer_Abstract implements Zend_Log_FactoryInterface
/**
* Validate and optionally convert the config to array
- *
+ *
* @param array|Zend_Config $config Zend_Config or Array
* @return array
* @throws Zend_Log_Exception
diff --git a/libs/Zend/Log/Writer/Db.php b/libs/Zend/Log/Writer/Db.php
index 6f77a12cb7..54634040b4 100644
--- a/libs/Zend/Log/Writer/Db.php
+++ b/libs/Zend/Log/Writer/Db.php
@@ -17,7 +17,7 @@
* @subpackage Writer
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Db.php 20096 2010-01-06 02:05:09Z bkarwin $
+ * @version $Id: Db.php 22514 2010-07-01 14:11:18Z ramon $
*/
/** Zend_Log_Writer_Abstract */
@@ -29,7 +29,7 @@
* @subpackage Writer
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Db.php 20096 2010-01-06 02:05:09Z bkarwin $
+ * @version $Id: Db.php 22514 2010-07-01 14:11:18Z ramon $
*/
class Zend_Log_Writer_Db extends Zend_Log_Writer_Abstract
{
@@ -68,7 +68,7 @@ class Zend_Log_Writer_Db extends Zend_Log_Writer_Abstract
/**
* Create a new instance of Zend_Log_Writer_Db
- *
+ *
* @param array|Zend_Config $config
* @return Zend_Log_Writer_Db
* @throws Zend_Log_Exception
@@ -77,15 +77,15 @@ class Zend_Log_Writer_Db extends Zend_Log_Writer_Abstract
{
$config = self::_parseConfig($config);
$config = array_merge(array(
- 'db' => null,
- 'table' => null,
+ 'db' => null,
+ 'table' => null,
'columnMap' => null,
), $config);
-
+
if (isset($config['columnmap'])) {
$config['columnMap'] = $config['columnmap'];
}
-
+
return new self(
$config['db'],
$config['table'],
@@ -96,10 +96,10 @@ class Zend_Log_Writer_Db extends Zend_Log_Writer_Abstract
/**
* Formatting is not possible on this writer
*/
- public function setFormatter($formatter)
+ public function setFormatter(Zend_Log_Formatter_Interface $formatter)
{
// require_once 'Zend/Log/Exception.php';
- throw new Zend_Log_Exception(get_class() . ' does not support formatting');
+ throw new Zend_Log_Exception(get_class($this) . ' does not support formatting');
}
/**
diff --git a/libs/Zend/Log/Writer/Syslog.php b/libs/Zend/Log/Writer/Syslog.php
index d7827c9ce3..722744271b 100644
--- a/libs/Zend/Log/Writer/Syslog.php
+++ b/libs/Zend/Log/Writer/Syslog.php
@@ -17,7 +17,7 @@
* @subpackage Writer
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: Syslog.php 22477 2010-06-21 12:15:35Z matthew $
+ * @version $Id: Syslog.php 22632 2010-07-18 18:30:08Z ramon $
*/
/** Zend_Log_Writer_Abstract */
@@ -191,7 +191,7 @@ class Zend_Log_Writer_Syslog extends Zend_Log_Writer_Abstract
throw new Zend_Log_Exception('Invalid log facility provided; please see http://php.net/openlog for a list of valid facility values');
}
- if (strstr(strtolower(PHP_OS), 'windows')
+ if ('WIN' == strtoupper(substr(PHP_OS, 0, 3))
&& ($facility !== LOG_USER)
) {
// require_once 'Zend/Log/Exception.php';
diff --git a/libs/Zend/Log/Writer/ZendMonitor.php b/libs/Zend/Log/Writer/ZendMonitor.php
index 59a648fa8b..a6c1843779 100644
--- a/libs/Zend/Log/Writer/ZendMonitor.php
+++ b/libs/Zend/Log/Writer/ZendMonitor.php
@@ -17,7 +17,7 @@
* @subpackage Writer
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id$
+ * @version $Id: ZendMonitor.php 22533 2010-07-07 02:38:14Z ramon $
*/
/** Zend_Log_Writer_Abstract */
@@ -29,7 +29,7 @@
* @subpackage Writer
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id$
+ * @version $Id: ZendMonitor.php 22533 2010-07-07 02:38:14Z ramon $
*/
class Zend_Log_Writer_ZendMonitor extends Zend_Log_Writer_Abstract
{
@@ -51,7 +51,7 @@ class Zend_Log_Writer_ZendMonitor extends Zend_Log_Writer_Abstract
/**
* Create a new instance of Zend_Log_Writer_ZendMonitor
- *
+ *
* @param array|Zend_Config $config
* @return Zend_Log_Writer_Syslog
* @throws Zend_Log_Exception
@@ -64,10 +64,10 @@ class Zend_Log_Writer_ZendMonitor extends Zend_Log_Writer_Abstract
/**
* Is logging to this writer enabled?
*
- * If the Zend Monitor extension is not enabled, this log writer will
- * fail silently. You can query this method to determine if the log
+ * If the Zend Monitor extension is not enabled, this log writer will
+ * fail silently. You can query this method to determine if the log
* writer is enabled.
- *
+ *
* @return bool
*/
public function isEnabled()
@@ -103,7 +103,7 @@ class Zend_Log_Writer_ZendMonitor extends Zend_Log_Writer_Abstract
unset($event['priority'], $event['message']);
if (!empty($event)) {
- monitor_custom_event($priority, $message, $event);
+ monitor_custom_event($priority, $message, false, $event);
} else {
monitor_custom_event($priority, $message);
}