Fatal error: Call to undefined function uc_range() in /home/content/html/sites/all/modules/uc_recurring/modules/uc_recurring_product/uc_recurring_product.module on line 97
Created a product, edit, features and add recurring.

http://example.com/node/85/edit/features/recurring/add

CommentFileSizeAuthor
#4 1118426-1.patch1.79 KBjrust

Comments

tr’s picture

Project: Ubercart » UC Recurring Payments and Subscriptions
Version: 7.x-3.x-dev » 7.x-2.x-dev

Issue is with uc_recurring, not with Ubercart.

dfludd’s picture

I have the same error is there a fix for this? Thanks!

Fatal error: Call to undefined function uc_range() in /home/mysite/public_html/main/modules/ubercart/uc_recurring/modules/uc_recurring_product/uc_recurring_product.module on line 97

dave the brave’s picture

I got the same now, probably due to the separation of Ubercart and uc_recurring. Here's a quick fix:

Add the following function

function uc_range($a, $b) {
  for ($i=$a; $i<=$b; $i++) {
    $c[] = $i;
  }
  return $c;
}

Maybe there is more to it but it looks like it just takes a couple of values and creates an array of that range.

HTH

jrust’s picture

Title: Fatal error: Call to undefined function uc_range() in » Replace uc_range with range
Status: Active » Needs review
StatusFileSize
new1.79 KB

uc_range is gone in Ubercart 3/Drupal 7 because php 5.2 is minimally required and thus the PHP native range() function can be used.

univate’s picture

Status: Needs review » Fixed

thanks, committed.

Status: Fixed » Closed (fixed)

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