Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
A warning keep appearing in the watchdog:
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 74 of /opt/difang/prod/qlkaixin/sites/all/modules/views_galleriffic/views_galleriffic.module).
Comment | File | Size | Author |
---|---|---|---|
#26 | views_galleriffic-strict_warnings-1208298-26.patch | 1.78 KB | absoludo |
#2 | gallerific.jpg | 31.24 KB | casdesign |
Comments
Comment #1
tripper54 CreditAttribution: tripper54 commentedI'm getting the same notices when viewing a gallery (via an attached view) with 7.1.0 except for the line numbers - 92,94,99,103 and 108, eg
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 108 of C:\xampp\dev\sites\all\modules\views_galleriffic\views_galleriffic.module).
Comment #2
casdesign CreditAttribution: casdesign commentedI am also getting a similar error. This is what mine says:
"•Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 92 of C:\xampp\htdocs\drupal\sites\all\modules\views_galleriffic\views_galleriffic.module).
•Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 94 of C:\xampp\htdocs\drupal\sites\all\modules\views_galleriffic\views_galleriffic.module).
•Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 92 of C:\xampp\htdocs\drupal\sites\all\modules\views_galleriffic\views_galleriffic.module).
•Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 108 of C:\xampp\htdocs\drupal\sites\all\modules\views_galleriffic\views_galleriffic.module).
•Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 92 of C:\xampp\htdocs\drupal\sites\all\modules\views_galleriffic\views_galleriffic.module).
•Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 103 of C:\xampp\htdocs\drupal\sites\all\modules\views_galleriffic\views_galleriffic.module).
•Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 92 of C:\xampp\htdocs\drupal\sites\all\modules\views_galleriffic\views_galleriffic.module).
•Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 99 of C:\xampp\htdocs\drupal\sites\all\modules\views_galleriffic\views_galleriffic.module)."
It seems to show these 8 warnings times the number of images on that page in the gallery. For example, I have one page with 2 thumbnail images, and there are 16 bullet points. Another page only has one image and there are the 8 bullet points above.
I don't know if this is related to the problem, but the large version of the image is covering the prev/next buttons. I attatched a screenshot incase that would help.
I am also using Entity Views Attatch. I would love to be able to use this module as it seems to be the only one I have found that claims to work with combining different nodes into a gallery.
Comment #3
SN00Py CreditAttribution: SN00Py commentedD0es any 0ne have a s0luti0n t0 this pr0blem i'm getting it als0.
Comment #4
Mores CreditAttribution: Mores commentedGot also the same problem, although the gallery attached to the node functions well.
Comment #5
Mores CreditAttribution: Mores commentedI found a solution. This error tells you the code instantiated a default object (of type stdClass) implicitely. PHP is strict and doesn't accept this, because the $object wasn't created explicitely. The solution to this is rather simple: add the explicit instantiation and it's fixed.
I added 3 lines of code to the views_galleriffic.module file:
The code starting @ line 90 should look like:
Hope this is useful for other people!
Comment #6
josephcvh CreditAttribution: josephcvh commentedHi all,
Im also having this issue. Trying out Mores solution came out less but still have the error.
Anymore solution?
And also how to add image to view galleriffic? Sorry, Im new with drupal.
Thanks,
Joseph
Comment #7
Smokenham CreditAttribution: Smokenham commentedHello
I was having the same issue. My error list looked like this:
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 95 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 100 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 111 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 105 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 95 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 100 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 111 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 105 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 95 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 100 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Notice: Undefined index: slide in include() (line 7 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views-galleriffic-view-gallerifficrows.tpl.php).
Notice: Trying to get property of non-object in include() (line 7 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views-galleriffic-view-gallerifficrows.tpl.php).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 95 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 100 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 93 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Notice: Undefined index: slide in include() (line 7 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views-galleriffic-view-gallerifficrows.tpl.php).
Notice: Trying to get property of non-object in include() (line 7 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views-galleriffic-view-gallerifficrows.tpl.php).
I followed Mores advice and added in the explicit instantiations and my error list shrank to this:
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 95 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 100 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 95 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 100 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 95 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 100 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Notice: Undefined index: slide in include() (line 7 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views-galleriffic-view-gallerifficrows.tpl.php).
Notice: Trying to get property of non-object in include() (line 7 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views-galleriffic-view-gallerifficrows.tpl.php).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 95 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Strict warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 100 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views_galleriffic.module).
Notice: Undefined index: slide in include() (line 7 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views-galleriffic-view-gallerifficrows.tpl.php).
Notice: Trying to get property of non-object in include() (line 7 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views-galleriffic-view-gallerifficrows.tpl.php).
You need to add two more explicit instantiations into the code
it should look like this:
Now I am only left with these errors:
Notice: Undefined index: slide in include() (line 7 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views-galleriffic-view-gallerifficrows.tpl.php).
Notice: Trying to get property of non-object in include() (line 7 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views-galleriffic-view-gallerifficrows.tpl.php).
Notice: Undefined index: slide in include() (line 7 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views-galleriffic-view-gallerifficrows.tpl.php).
Notice: Trying to get property of non-object in include() (line 7 of C:\xampp\htdocs\lelia\sites\all\modules\views_galleriffic\views-galleriffic-view-gallerifficrows.tpl.php).
Will try to fix this later.
Hope this helps someone out there.
Comment #8
iancu35 CreditAttribution: iancu35 commented@Smokenham; your solution works perfectly in both 7 - release and dev -versions; thks :)
I gues your error derives from 'Galleriffic' row style, e.g.:
- not assinging an image field preset to (slide galleriffic field is set to none), or
- setting one single image field twice: for "thumbnail" and "slide" galleriffic fileds, or
- having the same image preset twice (even you have 2 image fields): for "thumbnail" and "slide" galleriffic fileds
hope it will help
iancu
Comment #9
RaulMuroc CreditAttribution: RaulMuroc commentedI am really off of time to do it but as soon as I'm free I'll work on patching through @Smokenham solution.
Meanwhile, could somebody make a patch on that?
Thanks in advance.
Comment #10
jibranPFA the patch of code in http://drupal.org/node/1208298#comment-5294164
Comment #11
jibranstatus change
Comment #12
acouch CreditAttribution: acouch commentedIs anyone still having this problem? I believe this was fixed here: #1346966: Notice: Undefined index in line 7
Comment #13
hawkeye.twolfUpdating status. This issue is closely related to, but not a duplicate, of #1346966: Notice: Undefined index in line 7.
The patch that fixed this issue still needs to be committed (after updating line numbers to reflect the latest release code). I created #1773972: Committing two patches instead of re-opening this issue.
Comment #14
acouch CreditAttribution: acouch commentedComment #15
hevilp CreditAttribution: hevilp commentedis this bug solved or not?
Comment #16
Ahigh4life CreditAttribution: Ahigh4life commentedtried the patch.....Working
Comment #17
sacha05 CreditAttribution: sacha05 commentedI confirm; #10 worked for me.
Comment #18
LeeHle CreditAttribution: LeeHle commentedHey...
Could someone please help me.
And I don't know how to fix it as I'm a drupal newbie. Please could someone help me? Or let me know where to plugin the PFA patch that's seemed to have solved most of your errors.
Comment #19
jibranPlease clone the module using http://drupal.org/node/498690/git-instructions/7.x-1.x using "Setting up repository for the first time" section. Download the patch in #10. Place in your cloned views_galleriffic folder and apply the patch by using "Applying a patch" section.
The longer and detailed version can be found here http://drupal.org/node/620014.
Comment #20
LeeHle CreditAttribution: LeeHle commentedThank you so much I'll check it out and let you know how it goes :)
Comment #21
LeeHle CreditAttribution: LeeHle commentedthank you so much it works :)
Comment #22
pcaplan CreditAttribution: pcaplan commentedI'm posting this here because I was using the wonderful tutorial by acouch, Step by Step Instructions for Views Galleriffic in Drupal 7. He said if you had problems to open an issue here. Rather than opening an issue, I found this issue describes my problem.
Everyone who commented on the tutorial said it worked wonderfully, but I got this "Strict warning" message. I don't understand why I get the message when I'm following the steps completely and other people didn't get it.
Is there any way around the message besides installing the patch?
Comment #23
nguy3ndk CreditAttribution: nguy3ndk commentedCool, It's good
Comment #24
sui_page CreditAttribution: sui_page commentedI keep getting:
when I try and install the patch. What am I doing wrong? I've just moved a site from my dev server to my localhost and all of sudden this errors popped up.
Comment #25
sui_page CreditAttribution: sui_page commentedI stopped getting this error by simply uploading a default placeholder image into my content type field
Comment #26
absoludo CreditAttribution: absoludo at Trinoco commentedFor those interested, the patch #10 did not apply for me on 7.x-1.1 because of different row numbers.
I created a newer patch based on the sollution given in #10.
Comment #27
PalaDolphin CreditAttribution: PalaDolphin commentedI'm getting these same warning messages. But, here's the strange thing: I performed the installation and followed Step by Step instructions from https://drupal.org/node/1578774 on three Drupal 7.23 installations at the same time; a live, alpha, and localhost (laptop). Only the localhost is failing; The live and alpha sites work fine. Very strange.
Comment #28
schmook CreditAttribution: schmook commentedI had this issue crop up on an existing site. The host upgraded their account to PHP 5.4. After switching back to PHP 5.3 the errors went away.
Hopefully, this may help someone...
Comment #29
PalaDolphin CreditAttribution: PalaDolphin commentedIt's not a 5.4 issue for me:
PHP version 5.3.27
I will try to apply the above patch, but since this only happens on my laptop's localhost and not live, I'm delaying it until I evaluate other picture modules. There's other things I'm not satisfied with when it comes to Galleriffic.
Comment #30
Sk8erPeter CreditAttribution: Sk8erPeter commented@PalaDolphin: it's not so strange, the output of these error messages may depend on at least three things:
E_STRICT
became part ofE_ALL
above 5.4.0 (http://php.net/manual/en/function.error-reporting.php). This means "Strict warnings" do not get displayed witherror_reporting(E_ALL);
under PHP versions 5.4.0.error_reporting
settings: e.g.E_ALL|E_STRICT
or justE_ALL
or others... E.g. with PHP 5.3, strict error messages only get displayed withE_ALL|E_STRICT
setting, but no strict messages get output withE_ALL
. But as I mentioned, above 5.4.0,E_STRICT
is part ofE_ALL
.admin/config/development/logging
(Administration » Configuration » Development » Logging and errors): there are 3 possible options for "Error messages to display":But - as the text suggests - "It is recommended that sites running on production environments do not display any errors."
Comment #31
PalaDolphin CreditAttribution: PalaDolphin commentedYah think?
I misspoke (or mis-typed) before regarding my PHP version.
Live is running PHP version 5.3.27.
Localhost (laptop) is running PHP Version 5.4.4.
That is why only localhost is reporting warnings.
Now, if I could just translate what Sk8erPeter said into coxing localhost to turn off those infernal warnings, I'd be a happy clam. I'm not really interested in the code change solutions right now, since I'm only evaluating photo gallery modules.
Got it! Setting Error logging to None avoids the warnings. I'll have to remember to turn this back on when I start developing modules.
Thank you Sk8erPeter for your help.
Comment #32
tripper54 CreditAttribution: tripper54 commentedChanging the issue title back.
Comment #33
tjtj CreditAttribution: tjtj commentedThis is still (just) happening for me. Everything is up to date:
Warning: Creating default object from empty value in template_preprocess_views_galleriffic_view_gallerifficrows() (line 104 of /home5/briarcli/public_html/new/sites/all/modules/views_galleriffic/views_galleriffic.module).
The fixes described here worked, but why aren't they incorporated into the distribution versions? Even the development version has this bug.
Comment #34
mhamed CreditAttribution: mhamed commentedOK
#26
fixed the problem of :
and other 12 errors of the same kind
with drupal 7.34
views_galleriffic 7.x-1.x
thanks for the work
Comment #35
roderikThanks all.
Comment #36
roderikOK what I meant to do was set RTBC.
Comment #37
modulist CreditAttribution: modulist commentedI ran into a similar warning using the views_galleriffic 7.x-1.1:
The module did not throw any errors in a development environment running PHP 5.3.6-13ubuntu3.10. However, the errors surfaced when I migrated the site to a local environment running 5.5.18.
I applied the patch #26 https://www.drupal.org/files/views_galleriffic-strict_warnings-1208298-2... and the errors went away. However, the latest released version of the module does not appear to resolve the issue for PHP 5.5 without the patch.
Comment #38
roderikThat's exactly right. Status "Reviewed & tested by the community" means that the patch has not been committed yet to the module, but has been tested and reviewed enough that it should be.
Comment #39
kingfisher64 CreditAttribution: kingfisher64 commentedthanks roderik that worked lovely against the stable version.
Can we have this committed by the maintainer into a new version?
Thank you
Comment #40
Aezarien CreditAttribution: Aezarien commentedI tried #10 and I got an error which said the patch did not apply. I tried #26 and it seemed to apply without issue. I am still getting the same warnings, however. Additionally, I can see a slideshow now, but instead of seeing the four images I uploaded, it repeats the first one I uploaded. Is it necessary to go through the process of creating the content type again? Could this be why I am still seeing the errors?
Comment #41
Aezarien CreditAttribution: Aezarien commentedDer... I have never worked with patches before so I went with the assumption that if it worked for everyone else, I had to be doing something incorrectly. I was working in root directory with a clone and didn't copy to the modules directory in drupal. Otherwise, #26 worked and was magnificently easy to apply. I just wasn't paying attention to what I was doing. The other error was due to a mistake in my initial configuration in views. It's all up and running perfectly now. Thanks y'all.
Comment #42
Veshalen27 CreditAttribution: Veshalen27 commented#26 worked beautifully.
Comment #43
greenmana3 CreditAttribution: greenmana3 as a volunteer commentedPatch from Comment #37 worked perfectly. Thank You!
Comment #44
waqarit CreditAttribution: waqarit commentedpatch #10 has worked for me. thanks Jibran
Comment #45
meno1max CreditAttribution: meno1max commentedStill having this problem, with Drupal 7.43 and Views Galleriffic 7.x-1.1:
Server is running PHP 5.6.19
After all these years, aren't the patches above already included in Views Galleriffic?
Comment #46
steven.be CreditAttribution: steven.be commented#26 solves the error messages for me! Thank you absoludo!!
Comment #47
darvanenWorks well... let's get it committed.
If @acouch isn't around any more, does anyone here fit the criteria to apply for maintainer status and want to do so? I would, as the module is quite small, but this is my first interaction with the issue queue for this module.
Comment #48
GeorgeLangley CreditAttribution: GeorgeLangley commentedHi everyone. casdesign's fix is on the right trail, but was missing some "new stdClass()" lines. The following DOES work (Drupal 7.38, Vews 7.x-3.11, Views Galleriffic 7.x-1.1)
// This is to check if the field has an option. If not ignore.
if (count($object) > 1 ) {
$vars['fields'][$object['option']] = new stdClass();
$vars['fields'][$object['option']]->content = $object['content'];
if ($object['option'] == 'title_field') {
$vars['fields']['title'] = new stdClass();
$vars['fields']['title']->content = check_markup($vars['fields']['title_field']->content, $format_id = 'full_html', '', $check = FALSE);
// Slideshow can break if there are spaces or '#' in the title.
$vars['fields']['title']->stripped = str_replace('#', '', str_replace(' ','', strip_tags($vars['fields']['title_field']->content)));
}
if ($object['option'] == 'description_field') {
$vars['fields']['desc'] = new stdClass();
$vars['fields']['desc']->content = check_markup($vars['fields']['description_field']->content, $format_id = 'full_html', '', $check = FALSE);
}
if ($object['option'] == 'thumbnail_field') {
if (preg_match('/(src=")(\S+)(")/', $vars['fields']['thumbnail_field']->content, $thumb_url)) {
$vars['fields']['thumbnail'] = new stdClass();
$vars['fields']['thumbnail']->content = $thumb_url['2'];
};
}
if ($object['option'] == 'slide_field') {
if (preg_match('/(src=")(\S+)(")/', $vars['fields']['slide_field']->content, $slide_url)) {
$vars['fields']['slide'] = new stdClass();
$vars['fields']['slide']->content = $slide_url['2'];
}
}
}
}
// Allow for empty fields that didn't already get defined.
Comment #49
darvanenThanks George, would you like to roll that as a patch so it can go through automatic testing?
Comment #50
broonRecently switched from PHP 5.5.9 to 7.0.4 and this error message appeared. Patch in #26 resolved the issue.