Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users

Invalid start/end date

 

 

Bricolage users RSS feed   Index | Next | Previous | View Threaded


d.oliveira at prozone

Sep 9, 2009, 8:01 AM

Post #1 of 5 (1217 views)
Permalink
Invalid start/end date

Hello,

Searching for stories with cover date from 31 Aug 2009 (example) to
current date, we get "Invalid start date". The same problem occurs
when specifying end date.
Looking on the code, I found the problem..
It occurs because eval returns the error (Illegal octal digit '8')
while trying DateTime->new(year => 2009, month => 08, day => 31) and
the 08 value is naturally interpreted as an octal integer.
So, I changed the code. Watch the attached patch.
Thank you.


d.oliveira at prozone

Sep 9, 2009, 8:09 AM

Post #2 of 5 (1116 views)
Permalink
Re: Invalid start/end date [In reply to]

Ops,

Here is the patch URL.

http://prozone.org/~david/projects/bricolage/bric_search_dates_fix.patch


On Sep 9, 2009, at 4:01 PM, David Oliveira wrote:

> Hello,
>
> Searching for stories with cover date from 31 Aug 2009 (example) to
> current date, we get "Invalid start date". The same problem occurs
> when specifying end date.
> Looking on the code, I found the problem..
> It occurs because eval returns the error (Illegal octal digit '8')
> while trying DateTime->new(year => 2009, month => 08, day => 31) and
> the 08 value is naturally interpreted as an octal integer.
> So, I changed the code. Watch the attached patch.
> Thank you.
>
>
>
>
>
> --
> David Oliveira
> <d.oliveira [at] prozone>


david at kineticode

Sep 9, 2009, 9:29 AM

Post #3 of 5 (1120 views)
Permalink
Re: Invalid start/end date [In reply to]

On Sep 9, 2009, at 8:09 AM, David Oliveira wrote:

> Here is the patch URL.
>
> http://prozone.org/~david/projects/bricolage/bric_search_dates_fix.patch

Holy shit, who wrote that string eval crap? Jesus.

Oy! Scott, you committed this?

http://github.com/bricoleurs/bricolage/commit/a4890e4756b8d5f70d7941e7c608c63fe2973002

I'll have a look at integrating your patch in a bit, David, thanks.

David


greg at node79

Sep 9, 2009, 9:42 AM

Post #4 of 5 (1115 views)
Permalink
Re: Invalid start/end date [In reply to]

On 2009-09-09, at 12:29 PM, David E. Wheeler wrote:

> Holy shit, who wrote that string eval crap? Jesus.
>
> Oy! Scott, you committed this?
>
> http://github.com/bricoleurs/bricolage/commit/a4890e4756b8d5f70d7941e7c608c63fe2973002

That's my string eval crap...sorry about that :). I rewrote it after
running into the same bug as David O. last month but it got buried in
my local repository and never made it back to github among crazy
deadlines.


david at kineticode

Sep 9, 2009, 9:49 AM

Post #5 of 5 (1116 views)
Permalink
Re: Invalid start/end date [In reply to]

On Sep 9, 2009, at 9:42 AM, Greg Heo wrote:

>> http://github.com/bricoleurs/bricolage/commit/a4890e4756b8d5f70d7941e7c608c63fe2973002
>
> That's my string eval crap...sorry about that :). I rewrote it after
> running into the same bug as David O. last month but it got buried
> in my local repository and never made it back to github among crazy
> deadlines.

:-) I'm just glad it got caught!

Best,

David

Bricolage users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.