Login | Forgot password | Register

X

What is OpenID?

OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.

With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.

For more information visit the official OpenID site.

Jump to:

17478 Posts in 4473 Topics by 1972 members

Archive

SilverStripe Forums » Archive » temp fix for if Odd bug

Our old forums are still available as a read-only archive.

Page: 1
Go to End
Author Topic: temp fix for if Odd bug 757 Views
  • dashiel
    avatar
    Community Member
    13 posts

    temp fix for if Odd bug Link to this post

    i noticed there was a 3-month old, low priority ticket for the if Odd failing. i came up with what is probably a dirty hack, but basically i changed:

    line 647 in VariableData.php from

    function Odd() {
       return !$this->iteratorPos % 2;
    }

    to

    function Odd() {
       return !$this->Even();
    }

    it seems to work, and so far hasn't caused any weird spikes in performance. hope this helps those of you in need of a quick fix, until someone who knows PHP can fix it properly.

  • Sam
    avatar
    Administrator
    649 posts

    Re: temp fix for if Odd bug Link to this post

    That fix looks good; can you post it to open.silverstripe.com so that we can integrate it with the core?

  • dashiel
    avatar
    Community Member
    13 posts

    Re: temp fix for if Odd bug Link to this post

    i just uploaded to open.silverstripe.com - i added the file to the original trouble ticket. not sure if that's the right way to do it.

    757 Views
Page: 1
Go to Top

Currently Online: There is nobody online.

Welcome to our latest member: Newclear

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.