changeset 83:ec087515da38

fixed a typo.
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sat, 25 Oct 2008 01:18:00 +0800
parents 82acbba33b97
children 2c6c219dc3ff
files Ikariam.pm
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Ikariam.pm	Sat Oct 25 01:12:20 2008 +0800
+++ b/Ikariam.pm	Sat Oct 25 01:18:00 2008 +0800
@@ -385,8 +385,8 @@
         }
     } else {
         my $res = $self->{mech}->get (sprintf("http://%s/index.php?view=%s&id=%s&position=%d", $self->{server}, $type, $cityId, $position));
-        my $url = Ikariam::Extractor->new(content => $res->content)->find('//a[@title="升級建築物"/@href');
-        $self->{mech}->get($url);
+        my $url = Ikariam::Extractor->new(content => $res->content)->find('//a[@title="升級建築物"]/@href');
+        $self->{mech}->get($url) if(defined($url));
     }
 }