With the (few) changes between webform 3 and webform 4, it would be nice for webform contrib developers if webform had an API call that returned its version number. Ie, a 3 for webform 3.x and 4 for webform 4.x. That would be a rather more reliable way of knowing which version we're dealing with that guessing based on what elements are present in the data structure we're processing.

A specific example is my case is webform_serial, which needs to assign either an array to $submission['cid']['value'] or $submission[cid][0] depending on the webform version.

Comments

liam morland’s picture

You can use system_get_info() to get the running version of any module.

liam morland’s picture

Category: Feature request » Support request
Issue summary: View changes
Status: Active » Fixed

I think this resolves this issue. If not, please re-open and provide details.

Status: Fixed » Closed (fixed)

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

liam morland’s picture

One problem: system_get_info() does not give the version number if one is working from git.

liam morland’s picture