Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Oct 2007 at 12:45 UTC
Updated:
4 Aug 2010 at 17:46 UTC
Jump to comment: Most recent file
Comments
Comment #1
rmpel commentedThere are more issues in regard to $arg as first url-part.
All four issues involve the fact that the coder has failed to realise that
0 == falsereturnstrue, whilefalseis expected, in other words; where $arg at the first position (a.k.a. strpos == 0) should be seen as 'url has it' (a.k.a. if statements 'true' condition code) the == operator evaluates the condition as false, therefore executing the wrong code.Solution;
use === instead of ==
use !== instead of !=
and the fix Ardas provided; use !== false after an in-line assignment.
The patchfile included with this post is based on version 5.x-1.4-2rc1 (CVS ID Tag:
$Id: views.module,v 1.189 2006/12/20 06:13:49 merlinofchaos Exp $)A patch for the latest version (5.x-1.6 ,
$Id: views.module,v 1.166.2.43 2007/07/14 18:54:16 merlinofchaos Exp $) is included also, implementing two (2) times the patch suggested by Ardas only. The other issues seem not to apply as the caching of argument-urls has been removed (appearantly).Comment #2
catchthis is a patch.
Comment #3
catchhttp://drupal.org/node/193508#comment-692387
Comment #4
rmpel commentedIf you mark a topic as duplicate, please mark the newer topic about the same issue as duplicate. Mostly so because the topic you indicated only partly patches the problem.
Comment #5
esmerel commentedAt this time, only security fixes will be made to the 5.x version of Views.