[ 
https://issues.apache.org/jira/browse/LOG4PHP-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Marie Picot updated LOG4PHP-218:
-------------------------------------

    Description: 
When using the appender '_LoggerAppenderPDO_' I declare a parameter in my 
prepareStatement in format String and not use the conversion specifiers.
So, in the _parse()_ method in the class _LoggerPatternParser_, the variable 
_$end_ is not defined and generates an _notice exception php_.

For example, an extract of my logger configuration:
'bdd' => array(
                                'class' => 'LoggerAppenderPDO',
                                'params' => array(
                                        'dsn' => 
'mysql:host='.DB_HOST.';dbname=mdm_utils',
                                        'user' => DB_LOGIN,
                                        'password' => DB_PASSWORD,
                                        'table' => 'log',
                                        'insertSql' => 'INSERT INTO __TABLE__ 
(dt_log, environnement, logger, level_log, message) VALUES (?, ?, ?, ?, ?)',
                                        'insertPattern' => '%date{Y-m-d 
H:i:s},%env{MDM_DOMAIN_NAME},%c,%level,%message'
                                ),
                        ),

  was:
Lors de l'utilisation de de l'appender '_LoggerAppenderPDO_', je déclare un 
paramètre de mon prepareStatement en String et non en conversion specifiers.

Du coup, dans la méthode parse() de LoggerPatternParser, la variable $end n'est 
pas définie et php génère un _notice exception_.


> Undefined variable: end : helpers/LoggerPatternParser.php [119]
> ---------------------------------------------------------------
>
>                 Key: LOG4PHP-218
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-218
>             Project: Log4php
>          Issue Type: Bug
>          Components: Code
>    Affects Versions: 2.3.0
>            Reporter: Jean-Marie Picot
>            Priority: Minor
>              Labels: patch
>
> When using the appender '_LoggerAppenderPDO_' I declare a parameter in my 
> prepareStatement in format String and not use the conversion specifiers.
> So, in the _parse()_ method in the class _LoggerPatternParser_, the variable 
> _$end_ is not defined and generates an _notice exception php_.
> For example, an extract of my logger configuration:
> 'bdd' => array(
>                               'class' => 'LoggerAppenderPDO',
>                               'params' => array(
>                                       'dsn' => 
> 'mysql:host='.DB_HOST.';dbname=mdm_utils',
>                                       'user' => DB_LOGIN,
>                                       'password' => DB_PASSWORD,
>                                       'table' => 'log',
>                                       'insertSql' => 'INSERT INTO __TABLE__ 
> (dt_log, environnement, logger, level_log, message) VALUES (?, ?, ?, ?, ?)',
>                                       'insertPattern' => '%date{Y-m-d 
> H:i:s},%env{MDM_DOMAIN_NAME},%c,%level,%message'
>                               ),
>                       ),



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to