I get some warnings:
after hitting a button in the shopping cart (both update or checkout)
warning: strpos() [function.strpos]: Offset not contained in string. in [...]/ubercart/uc_product/uc_product.module on line 1184.
uc_product.module on line 1184:
if (!strpos(request_uri(), 'cart', -4)) { // 1184
drupal_set_message(t('Your item(s) have been updated.'));
}
The request_uri() both in 5.x and 6.x returns '/cart' .
So why this warning only in 6.x ?
I would appreciate some feedback wether this is an issue or only my singular problem.
Thanks, Axel
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | unneeded_strpos.patch | 386 bytes | alpritt |
Comments
Comment #1
alpritt commentedThis check has been removed from the latest 5 version. I'm not sure if anything else was changed at the same time since the bzr repository isn't responding at the moment, but looking at the code I can't really see why this is here so I guess those 3 lines can just be deleted.
Comment #2
AxelBernhardt commentedthanks,
deleted those lines and to me its ok.
will somebody check that into cvs?
(dont want to repeat that hack with every new release ...)
Comment #3
alpritt commentedI think you are being a bit premature calling this fixed. Fixed means fixed in the repository.
Found the commit for the d5 version, which is in agreement with my comment #1 above.
revno: 1263
committer: Lyle
branch nick: ubercart
timestamp: Thu 2008-09-11 16:45:13 -0400
message:
Can't actually find a reason for the extra updated message, and the call to request_uri() wasn't working right anyway.
Comment #4
rszrama commentedHmm... good point on the confusion of repositories. To be honest, once we commit something to Bzr, we consider it fixed. That's where our development occurs and where we recommend people staying up to date on development get their code. We push it to CVS for convenience's sake, but once we have an official release we've been only pushing to CVS when we actually deploy the release.
I'm going to go ahead and mark it fixed since that's what we'd expect, but feel free to post follow-ups to this in this issue. Lyle has big plans for getting Bzr synched up w/ CVS, but for now consider the Bzr repository our main development repository.
Comment #5
alpritt commentedSorry, I'm not being clear. I am pulling from the bzr repositories and completely ignoring CVS. What I am saying is this is fixed for the 5.x-1.x version, but the fix needs porting to the 6.x-2.x version. That's in bzr. I've just double checked the bzr repo and the port doesn't exist yet.
In fact, here is a patch made against bzr just moments ago.
Comment #6
Island Usurper commentedOK, it's definitely gone now. I thought I'd fixed it in the D6 branch, but it may have gotten reverted somehow.
Comment #7
yaacovtp commentedI just downloaded and installed and am getting the same error still.
Comment #8
alpritt commentedWhere did you download from? Unfortunately the project page is not regularly synced with the latest dev release, so if you want the fix you will have to download from http://bazaar.ubercart.org/
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #10
Cactii1 commentedHow do you actually fix this???
I just want to patch the code until a new release of Ubercart comes out. So for me it is better to just alter the code and re-upload the effected module.
Can somebody tell me what lines of code to change? Or is it just removing the code altogether?
Comment #11
Island Usurper commentedThere's a patch in #5 you can use, but it's really just deleting those lines in the OP. Or you can get Bazzar and get the updated code from our repository.