Pluf Framework

Issue 807: [from indefero]Compilation failed: POSIX collating elements are not supported

Reported by filipe, May 22, 2012

Steps to reproduce the problem:
1. Go to my indefero
3. choose any project
2. http://<Myindefero>/p/<Myproject>/

Actual result:
2 : preg_replace_callback(): Compilation failed: POSIX collating 
elements are not supported at offset 120

My config:
-----------
- PHP Version 5.3.8
- PCRE Library Version = 8.13 2011-08-16
- Apache/2.2.21 (Linux/SUSE) 


I think this come from $marker_ol_re value in the function doLists()

Stacktrace:
------------

0 	$code   2
1 	$string preg_replace_callback(): Compilation failed: POSIX 
collating elements are not supported at offset 120
2 	$file   
/srv/www/htdocs/indefero/src/pluf/src/Pluf/Text/MarkDown.php
3 	$line 	862
4 	? 	

Array
(
    [text] => Cliquez sur l'onglet d'administration du projet 
pour définir la description du projet.


    [less_than_tab] => 3
    [marker_ul_re] => [*+-]
    [marker_ol_re] => \d+[.]
    [marker_any_re] => (?:[*+-]|\d+[.])
    [markers_relist] => Array
        (
            [[*+-]] => \d+[.]
            [\d+[.]] => [*+-]
        )

    [marker_re] => \d+[.]
    [other_marker_re] => [*+-]
    [whole_list_re] => 
				(								# $1 = whole list
				  (								# $2
					([ ]{0,3})	# $3 = number of spaces
					(\d+[.])			# $4 = first list item marker
					[ ]+
				  )
				  (?s:.+?)
				  (								# $5
					  \z
					|
					  \n{2,}
					  (?=\S)
					  (?!						# Negative lookahead for another list item marker
						[ ]*
						\d+[.][ ]+
					  )
					|
					  (?=						# Lookahead for another kind of list
					    \n
						\3						# Must have the same indentation
						[*+-][ ]+
					  )
				  )
				)

Comment 1 by Jamie Lennox, May 28, 2012

Is apparently a problem with newer PHP 5.3 and the provided version 
of MarkDown.

Fixed for me by getting the newer markdown extra from 
http://michelf.com/projects/php-markdown/ to replace 
src/Pluf/Text/MarkDown.php then re-add the missing function: 

function Pluf_Text_MarkDown_parse($text) {
    return Markdown($text);
}

Comment 2 by filipe, May 30, 2012

tankx & nice
fixed for me too
merci

Comment 3 by Thomas Keller, Jun 5, 2012

Thanks for the pointer, fixed in rev 8b4b7ef.
Status: Fixed
Owner: tommyd

Created: 1 year 2 days ago by filipe

Updated: 11 months 19 days ago

Status: Fixed

Owner: Thomas Keller

Followed by: 1 person

Labels:
Priority:Medium
Type:Defect