debug = on is a problem by interpret the config.ini

8 views
Skip to first unread message

k00ni

unread,
Jun 27, 2009, 7:27:21 AM6/27/09
to OntoWiki User Discussion
Hi,

for enable the debug mode you wrote in the wiki: set debug = on

If we check with

if ( 'on' == $erfurt->getConfig ()->get ('debug') )

the $erfurt->getConfig ()->get ('debug') return value is crap:

- if debug = on, return value is like 1?,,
- if debug = on isnt set, return is empty

Notice: If in the config is debug = "on", then the if is fine! ( dont
oversee the " )


But if we check with

if ( 1 == $erfurt->getConfig ()->get ('debug') )

all is fine, too!


Is that our fault?

greetings

Michael Haschke

unread,
Jun 27, 2009, 7:56:09 AM6/27/09
to ontowi...@googlegroups.com
Hey,

I guess in the first case the value is treated as boolean var type (on =
true or 1), in the second cas the value is treated as string var "on".
So of course the returned var by getConfig() is totally different.

Just test with

if ( $erfurt->getConfig ()->get ('debug') )

this should work in both cases.

cheers...
Haschek

--
Website: http://haschek.eye48.com
Messenger: has...@jabber.ccc.de (see http://jabber.org)

Sebastian Dietzold

unread,
Jun 27, 2009, 8:10:16 AM6/27/09
to OntoWiki User Discussion
quote k00ni (27.6.2009):

> Is that our fault?

please look in the existing code and steal what you can :-)

e.g. in index.php you can see a test of debugging mode:

if (defined('_OWDEBUG')) { ... }

regards

SD

--
Sebastian Dietzold - Department of Computer Science; University of Leipzig
Tel/Fax: +49 341 97 323-66/-29 http://bis.uni-leipzig.de/SebastianDietzold

Reply all
Reply to author
Forward
0 new messages