Posted by funjay on September 4, 2010 at 4:32am
6 followers
Jump to:
| Project: | UC Wish List |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | Problem with substr in uc_wishlist.module |
Issue Summary
Line 427 in uc_wishlist.module is not calling substr with the right parameters.
427: if (!substr(request_uri(), 'wishlist', -4)) {
warning: substr() expects parameter 2 to be long, string given in C:\XAMPP\xampp\htdocs\drupal\modules\uc_subscription\uc_subscription.module on line 427.
Proper Usage:
string substr ( string $string , int $start [, int $length ] )
Basically substr is expecting an integer and it's getting the string 'wishlist'.
Comments
#1
#2
I have the same issue. Is there a fix?
#3
I can confirm the same issue...
warning: substr() expects parameter 2 to be long, string given in ...\ubercart\uc_wishlist\uc_wishlist.module on line 420.
#4
Subscribing.
#5
Getting this also
I'm not sure when this message is intended for display
So no idea how to fix it
#6
I just remark the line like this and problem solved
..................
...................
//edit by azul
//if (!substr(request_uri(), 'wishlist', -4)) {
drupal_set_message(t('Your item(s) have been updated.'));
//}
//edit by azul
.............
................
#7
Yes it will solve the problem of the warning appearing
But, as i mentioned previously, it doesn't solve the problem of when the message should be displayed
As now it will always be displayed, which wasn't the intention