Error message on several pages: "Notice: Undefined property: stdClass::$character_set..."

Created on 2 February 2017, over 8 years ago
Updated 21 May 2025, 19 days ago

Hi,
when accessing my page, I receive the following error message:

Notice: Undefined property: stdClass::$character_set in AtjsPregCallback->execute() (line 738 of /var/www/drupal/sites/all/modules/atjs/atjs.module).

A potential solution looks like the following:

diff --git a/sites/all/modules/atjs/atjs.module b/sites/all/modules/atjs/atjs.module
index 7b62278..febe30c 100644
--- a/sites/all/modules/atjs/atjs.module
+++ b/sites/all/modules/atjs/atjs.module
@@ -735,6 +735,9 @@
   }
 
   public function execute($text) {
+  	if(!isset($this->listener->character_set)) {
+  		$this->listener->character_set = 'basic';
+  	}
     switch ($this->listener->character_set) {
       case 'extended':
         $character_set = '^\s';

I set the value to 'basic' because this falls through to the default case of the switch statement.

I am unsure, why the character_set is not set.

What do you think? Do you need additional information from my side?

🐛 Bug report
Status

Fixed

Version

1.0

Component

User interface

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024