Log is getting filled with

Warning: simplexml_load_string(): Entity: line 1: parser error : Entity 'nbsp' not defined in _picture_filter_prepare_image() (line 1492 of /home/xxxx/sites/xxxx/sites/all/modules/picture/picture.module).

Added some code in to remove the offending nbsp;

Also added another check in to eliminate php notice

Notice: Undefined variable: attributes in _picture_filter_prepare_image() (line 1501

will add a patch soon.

Comments

ore’s picture

attiks’s picture

Status: Active » Needs review
jelle_s’s picture

+++ b/picture.module
@@ -1508,7 +1509,15 @@ function _picture_filter_prepare_image($image) {
-  $mapping_id = isset($attributes['data-picture-mapping']) ? $attributes['data-picture-mapping'] : $attributes['data-picture-group'];
+  if(isset($attributes['data-picture-mapping'])) {
+  	$mapping_id = $attributes['data-picture-mapping'];
+  } ¶
+  else if(isset($attributes['data-picture-group'])) {
+  	$mapping_id = $attributes['data-picture-group'];
+  } ¶
+  else {
+  	$mapping_id = null;
+  }

Could you fix the spacing issues?

attiks’s picture

Status: Needs review » Fixed

  • attiks committed 4685282 on 7.x-2.x authored by ore
    Issue #2514354 by ore: PHP warning on Parse error on nbsp's for...

Status: Fixed » Closed (fixed)

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

ore’s picture

Hi Jelle_s

Would love to but I'm not actually sure what you mean.

jelle_s’s picture

@ore
It has already been committed and fixed, so you don't need to do anything anymore ;-) but thanks :-)