missing desc.csv

Bug #440991 reported by Marius Scurtescu
This bug affects 1 person
Affects Status Importance Assigned to Milestone
UD Countdown
Fix Released
Michael Lustfield

Bug Description

The udcountdown_list_options functions tries to parse data/desc.csv. Two problems with that:

1. The return value of fopen is not checked for FALSE, as a result if the file cannot be open the whole script crashes pretty nasty with a memory error. The while loop should be entered only if $handle is not FALSE.

Here is the fixed code:
  $handle = fopen(file_directory_path() . '/countdown/data/desc.csv', 'r');
  if ($handle !== FALSE) {
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
      $opt = t('Option ' . $data[0] . ' - ' . $data[1]);
      $opts[] = $opt;

2. There is no data/desc.csv.

Related branches

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

Thanks for informing me of this. I don't have a system to handle this available however I will fix this early this week.

I think this is a fragment from a recent change. Thanks again.

Changed in ubuntu-drupal-countdown:
assignee: nobody → Michael Lustfield (mtecknology)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Michael Lustfield (michaellustfield) wrote :

This issue has been resolved in r33. The code was fixed and the csv file was added for download. I will be pushing this change to drupal.org right now.

Changed in ubuntu-drupal-countdown:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.