Warning: Creating default object from empty value in barcode_generate_image() (line 79 of.../sites/all/modules/barcode/includes/barcode.plugins.inc).

Comments

jerenus’s picture

Assigned: jerenus » Unassigned
Status: Active » Needs review
StatusFileSize
new907 bytes

Here is the patch to fix it.

skyredwang’s picture

Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

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

rich_dawson’s picture

I 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']);

rich_dawson’s picture

Issue summary: View changes
Status: Closed (fixed) » Needs work
rich_dawson’s picture

I 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.

destash’s picture

many thanks.

ramu1911’s picture

its works for me