Changeset - 741b915a23fe
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 15 years ago 2010-10-19 15:06:41
ohnobinki@ohnopublishing.net
During autocompletion, don't ever return ``Oops''.
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
auto.php
Show inline comments
 
@@ -119,24 +119,23 @@ if (file_exists($classes_file))
 
      if (!strncmp($class, $class_start, $class_start_strlen))
 
	{
 
	  $json_classes[] = $dept . '-' . $class;
 
	}
 

	
 
    echo json_encode($json_classes);
 
    exit(0);
 
  }
 

	
 
/**
 
 * Nothing caught..
 
 */
 
echo '["Oops"]';
 
exit(0);
 
clean_empty_exit();
 

	
 
/**
 
 * \brief
 
 *   Send an empty JSON array and exit.
 
 */
 
function clean_empty_exit()
 
{
 
  echo '[]';
 
  exit(0);
 
}
0 comments (0 inline, 0 general)