Skip Navigation

Text Only/ Printer-Friendly

Remove

New carl_util string functions to fix mbstring crash

July 1, 2009 at 3:30 pm
By nwhite

I've added a set of string functions to carl_util/misc.php. We have not documented that the mbstring extension is required, but there was a bunch of code in Reason that assumed it was present.

Direct calls to mbstring functions have now been replaced in the reason code base with calls to these:

  • carl_strpos
  • carl_strlen
  • carl_substr
  • carl_strtoupper
  • carl_strtolower

The above functions will use the mb_* version whenever possible, but alternatively just use the basic php function. The carl_* methods do not try to emulate the functionality of the multibyte string methods when mbstring is not loaded, but could be expanded to do this in the future.

Updated setup docs for Reason 4 Beta 8 will strongly recommend users enable mbstring, and warn when it is not installed.

The immediate change is really just intended to stop Reason from crashing in instances where mbstring is not available.

 

Add a comment

Name:*
Comment:*
The following fields are not to be filled out. Skip to Submit Button.
Not Comment:
(This is here to trap robots. Don't put any text here.)
Not URL:
(This is here to trap robots. Don't put any text here.)
Avoid:
(This is here to trap robots. Don't put any text here.)