#49428 [Opn->Asn]: cannot use array returned by tidy_get_config()

From: Date: Tue, 01 Sep 2009 14:02:44 +0000
Subject: #49428 [Opn->Asn]: cannot use array returned by tidy_get_config()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-141799@lists.php.net to get a copy of this message
ID: 49428 Updated by: kalle@php.net Reported By: patrickallaert@php.net -Status: Open +Status: Assigned Bug Type: Unknown/Other Function Operating System: Linux PHP Version: 6SVN-2009-09-01 (SVN) -Assigned To: +Assigned To: patrickallaert New Comment: Applied the patch for you Patrick Previous Comments: ------------------------------------------------------------------------ [2009-09-01 07:12:51] patrickallaert@php.net Description: ------------ This bug is perfectly similar to #47966 and can be reproduced with ext/tidy/tests/030.phpt. I can't fix it missing karma. The patch is at: http://pallaert.pastebin.com/f27da6f66 Reproduce code: --------------- <?php $buffer = '<html></html>'; $config = array( 'indent' => true, // AutoBool 'indent-attributes' => true, // Boolean 'indent-spaces' => 3, // Integer 'language' => 'de'); // String $tidy = new tidy(); $tidy->parseString($buffer, $config); $c = $tidy->getConfig(); var_dump($c['indent']); var_dump($c['indent-attributes']); var_dump($c['indent-spaces']); var_dump($c['language']); ?> Expected result: ---------------- int(1) bool(true) int(3) %s(2) "de" Actual result: -------------- Notice: Undefined index: indent in ext/tidy/tests/030.php on line 11 NULL Notice: Undefined index: indent-attributes in ext/tidy/tests/030.php on line 12 NULL Notice: Undefined index: indent-spaces in ext/tidy/tests/030.php on line 13 NULL Notice: Undefined index: language in ext/tidy/tests/030.php on line 14 NULL ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49428&edit=1

« previous php.bugs (#141799) next »