Warning: Creating default object from empty value in barcode_generate_image() (line 79 of.../sites/all/modules/barcode/includes/barcode.plugins.inc).
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | barcode-empty_value_in_barcode_generate_image-1937974-1.patch | 907 bytes | jerenus |
Comments
Comment #1
jerenus commentedHere is the patch to fix it.
Comment #2
skyredwangcommitted
Comment #4
rich_dawson commentedI am getting the same issue with the latest release (7.x-2.1) branch. The error I'm seeing is as follows:
Warning: Creating default object from empty value in barcode_generate_image() (line 79 of /barcode.plugins.inc).
Line 79 for me shows: $settings->default_path = drupal_realpath($barcode['default_path']);
Comment #5
rich_dawson commentedComment #6
rich_dawson commentedI was going to apply a patch, but the current 7.x-2.x version control branch has the needed change to stop this error from occuring...
On line 79 the object class needed to be declared (for PHP 5.3 and higher) and it is not in the current downloadable 7.x-2.1 branch on the plugin page.
The solution is simply:
$settings = new stdClass();
As this is already found in the latest version of code, I am requesting that the current downloadable version be updated to reflect this important change.
Comment #7
destash commentedmany thanks.
Comment #8
ramu1911 commentedits works for me