In textimage.module line 28 your defining PREG_CLASS_PUNCTUATION

It throws errors if it has already been defined. I changed the code as follows to check first whether it had already been defined.

if (!defined('PREG_CLASS_PUNCTUATION')) {
  define(
    'PREG_CLASS_PUNCTUATION',
    '\x{21}-\x{23}\x{25}-\x{2a}\x{2c}-\x{2f}\x{3a}\x{3b}\x{3f}\x{40}\x{5b}-\x{5d}' .
    '\x{5f}\x{7b}\x{7d}\x{a1}\x{ab}\x{b7}\x{bb}\x{bf}\x{37e}\x{387}\x{55a}-\x{55f}' .
    '\x{589}\x{58a}\x{5be}\x{5c0}\x{5c3}\x{5f3}\x{5f4}\x{60c}\x{60d}\x{61b}\x{61f}' .
    '\x{66a}-\x{66d}\x{6d4}\x{700}-\x{70d}\x{964}\x{965}\x{970}\x{df4}\x{e4f}' .
    '\x{e5a}\x{e5b}\x{f04}-\x{f12}\x{f3a}-\x{f3d}\x{f85}\x{104a}-\x{104f}\x{10fb}' .
    '\x{1361}-\x{1368}\x{166d}\x{166e}\x{169b}\x{169c}\x{16eb}-\x{16ed}\x{1735}' .
    '\x{1736}\x{17d4}-\x{17d6}\x{17d8}-\x{17da}\x{1800}-\x{180a}\x{1944}\x{1945}' .
    '\x{2010}-\x{2027}\x{2030}-\x{2043}\x{2045}-\x{2051}\x{2053}\x{2054}\x{2057}' .
    '\x{207d}\x{207e}\x{208d}\x{208e}\x{2329}\x{232a}\x{23b4}-\x{23b6}\x{2768}-' .
    '\x{2775}\x{27e6}-\x{27eb}\x{2983}-\x{2998}\x{29d8}-\x{29db}\x{29fc}\x{29fd}' .
    '\x{3001}-\x{3003}\x{3008}-\x{3011}\x{3014}-\x{301f}\x{3030}\x{303d}\x{30a0}' .
    '\x{30fb}\x{fd3e}\x{fd3f}\x{fe30}-\x{fe52}\x{fe54}-\x{fe61}\x{fe63}\x{fe68}' .
    '\x{fe6a}\x{fe6b}\x{ff01}-\x{ff03}\x{ff05}-\x{ff0a}\x{ff0c}-\x{ff0f}\x{ff1a}' .
    '\x{ff1b}\x{ff1f}\x{ff20}\x{ff3b}-\x{ff3d}\x{ff3f}\x{ff5b}\x{ff5d}\x{ff5f}-' .
    '\x{ff65}'
  );
}
CommentFileSizeAuthor
#3 preg_class_punc.patch3.07 KBGarrett Albright

Comments

deciphered’s picture

What other modules are you using?

It sound's like another module is causing a namespace issue, and just because it's defining 'PREG_CLASS_PUNCTUATION', doesn't mean it's got the same value.

Cheers,
Deciphered.

deciphered’s picture

Status: Active » Closed (fixed)

Closed due to lack of response.

Garrett Albright’s picture

Priority: Minor » Normal
Status: Closed (fixed) » Needs review
StatusFileSize
new3.07 KB

We got bit by this one.

PREG_CLASS_PUNCTUATION is defined in search.module. In fact, it looks like the definition in textimage.module is just a copy-paste of what's in search.module.

I'm surprised we didn't run into this problem earlier… but recently when we tried updating our codebase to use the most recent release of Pressflow, we had some really bizarre WSOD problems where this error would happen while modules were being loaded, and it would cause Drupal/Pressflow to try to fire up the theme engine and print the error apparently, causing undefined function errors when stuff in the theme layer tried to cause functions in modules which weren't loaded yet.

Patch attached. Tempted to mark this as "critical," since this problem pretty much kills us, but since apparently nobody else has had to use this issue since January, I'll settle for "normal."

Garrett Albright’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev

Changing version to 6.x - co-worker just noticed that. Perhaps this is only an issue in 6.x?

wundo’s picture

Status: Needs review » Fixed

Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.