[Plugin: Runners Log] [bug] function hms2sec redefined
-
hi,
love your plugin, it’s been working great.
i did run into one small bug. the function hm2sec() is defined within function runners_log_basic(). while legal in php, the function does get declared in the global namespace. this is not a problem if you just call the [runners_log_basic] shortcode once on a page. however, if you call it multiple times, you get an error that the function hm2sec() is redefined.
the solution is simple, just move the function declaration hm2sec() out of runners_log_basic().
test case:
1) create post with runners log data and [runners_log_basic] in the body of the post
2) create second post with data and [runners_log_basic] in the body of the post
3) visit your home page (or any page displaying the two posts at the same time)thanks for all your hard work on this
michael
The topic ‘[Plugin: Runners Log] [bug] function hms2sec redefined’ is closed to new replies.