Active
Project:
Simple Page Title
Version:
6.x-1.2
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Nov 2011 at 19:43 UTC
Updated:
25 Jan 2012 at 10:58 UTC
Hi there,
While looking at the code, I've spotted 2 minor issues that I'd consider bugs:
if (!empty($path_alias))
$result_object = db_fetch_object($result);
return $result_object;
Only setting $result_object if $path_alias is not empty doesn't seem correct. Maybe it should be: if (!empty($result))
$path = drupal_get_path_alias($_GET['q']);
//check for custom title based on original url and alias
$page_title_object = simple_page_title_get_page_title_object_for_path($_GET['q'], $path);
drupal_get_path_alias returns the value passed to it if no alias exists. So anytime that's the case, simple_page_title_get_page_title_object_for_path is being called with 2 identical parameters. It works, but I doubt that's what was intended.
Comments
Comment #1
jeebsuk commentedThanks for your observations on this, I'll take another look and get back to you.