#38167 [Opn->Bgs]: Syntax Highlighting: Error
| From: | sniper@php.net | Date: | Sun, 23 Jul 2006 11:53:50 +0000 |
| Subject: | #38167 [Opn->Bgs]: Syntax Highlighting: Error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-99784@lists.php.net to get a copy of this message | ||
ID: 38167
Updated by: sniper@php.net
Reported By: leestevens318 at msn dot com
-Status: Open
+Status: Bogus
Bug Type: *Programming Data Structures
Operating System: Windows
PHP Version: 4.4.2
New Comment:
Until you can come up with a reproducing script (the one you provided
does absolutely nothing) I'll bogus this since for me this works just
fine.
Previous Comments:
------------------------------------------------------------------------
[2006-07-22 17:23:37] leestevens318 at msn dot com
I don't own the server to install this, is there any other way to fix
this error? Perhaps a diffrent script?
------------------------------------------------------------------------
[2006-07-22 12:14:23] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
------------------------------------------------------------------------
[2006-07-21 06:47:05] leestevens318 at msn dot com
Updated: Hole script, http://www.leestevens.co.uk/error.phps
------------------------------------------------------------------------
[2006-07-20 20:57:42] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.
If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2006-07-20 19:18:44] leestevens318 at msn dot com
Description:
------------
Syntax Highlighting Error, i'm useing you syntax highlighting, and get
a error when i use speach marks inside brackets.
Reproduce code:
---------------
function highlight($code='') {
if(!$this->preprocess($code)) {
$code = '<code>' . $code . '</code>';
} else {
$code = str_replace('< ?php', '<?php', $code);
$code = str_replace('<br />', '', $code);
ob_start();
highlight_string($code);
$code = ob_get_contents();
ob_end_clean();
}
return stripslashes($code);
}
Expected result:
----------------
Should of Printed out:
$wpdb->get_var(hSELECT COUNT(*) FROM $wpdb->comments WHERE
comment_approved = 0);
With Syntax Highlighting.
Actual result:
--------------
When it's read and went throught the Syntax Highlighting, it comes out
like this:
$wpdb->get_var(”SELECT COUNT(*) FROM $wpdb->comments WHERE
comment_approved = 0”);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38167&edit=1