Sunday, July 4, 2010

Inflector::slug preg_replace is not working as expected.

Hi

<b>Inflector::slug</b> It is working good on all my other servers, but
at one of my linux machine it is not working.

<pre>
$string="Eva.Cast";
$map['/[^\s\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}]/mu']="_";
echo preg_replace(array_keys($map), array_values($map), $string);
</pre>

At one of my linux machine it output
<pre>
__________t
<pre>

But if I remove <b>[^\s</b>, it output
<pre>
Eva.Cast_
</pre>

I do not know why it is not working as expected? It is working fine on
rest of machines (Linux/Windows)
/cake/libs/Inflector.php line : 618

Thanks
Junaid Ahmed

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: