PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Text » Text_Highlighter » Bug #6231

Undefined property _defClass notice in HTML renderer

Details

Submitted2005-12-12 16:26 UTC
Frommjohnson at pitsco dot com
Assignedblindman
StatusClosed
PackageText_Highlighter
PHP Version4.3.10
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2005-12-12 16:26 UTC] mjohnson at pitsco dot com

Description:
------------
The HTML renderer issues "Notice: Undefined property: _defClass in /usr/share/php/Text/Highlighter/Renderer/Html.php on line 125" when error reporting allows notices.

I'm using version 0.6.6 beta of Text_Highlighter.

Test script:
---------------
Unified diff:

--- /usr/share/php/Text/Highlighter/Renderer/Html.php 2005-11-14 17:00:32.000000000 -0600
+++ Html.php 2005-12-12 10:22:30.197113278 -0600
@@ -122,7 +122,7 @@
function reset()
{
$this->_output = '';
- $this->_lastClass = $this->_defClass;
+ $this->_lastClass = @$this->_defClass;
if (isset($this->_options['numbers'])) {
$this->_numbers = (int)$this->_options['numbers'];
if ($this->_numbers != HL_NUMBERS_LI && $this->_numbers != HL_NUMBERS_TABLE) {

[2006-02-03 23:34 UTC] blindman at php dot net

Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pear.php.net/get/Text_Highlighter