[Slim-Checkins] r11846 - in /branches/6.5/server: Changelog6.html HTML/EN/cmdwrappers Slim/Display/Lib/Fonts.pm Slim/Music/Info.pm Slim/Utils/Misc.pm Slim/Utils/Text.pm
kdf at svn.slimdevices.com
kdf at svn.slimdevices.com
Fri Apr 27 17:32:08 PDT 2007
Author: kdf
Date: Fri Apr 27 17:32:08 2007
New Revision: 11846
URL: http://svn.slimdevices.com?rev=11846&view=rev
Log:
Bug: 4940
Description: 0 can be a valid folder or item name, so avoid the my $foo = shift || return, allow 0 as valid for titles and strings
Modified:
branches/6.5/server/Changelog6.html
branches/6.5/server/HTML/EN/cmdwrappers
branches/6.5/server/Slim/Display/Lib/Fonts.pm
branches/6.5/server/Slim/Music/Info.pm
branches/6.5/server/Slim/Utils/Misc.pm
branches/6.5/server/Slim/Utils/Text.pm
Modified: branches/6.5/server/Changelog6.html
URL: http://svn.slimdevices.com/branches/6.5/server/Changelog6.html?rev=11846&r1=11845&r2=11846&view=diff
==============================================================================
--- branches/6.5/server/Changelog6.html (original)
+++ branches/6.5/server/Changelog6.html Fri Apr 27 17:32:08 2007
@@ -54,6 +54,7 @@
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4910">#4910</a> - Fishbone skin: Some texts are cut off.</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4924">#4924</a> - Nice to have: Up and Down buttons for PlayList on Dark skin</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4926">#4926</a> - Mac Installer & Preference Pane still shows 6.5.1 should be 6.5.2</li>
+ <li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4940">#4940</a> - Error! url:[0] is empty or a track could not be read</li>
</ul>
<br />
<li>Other:
Modified: branches/6.5/server/HTML/EN/cmdwrappers
URL: http://svn.slimdevices.com/branches/6.5/server/HTML/EN/cmdwrappers?rev=11846&r1=11845&r2=11846&view=diff
==============================================================================
--- branches/6.5/server/HTML/EN/cmdwrappers (original)
+++ branches/6.5/server/HTML/EN/cmdwrappers Fri Apr 27 17:32:08 2007
@@ -112,7 +112,7 @@
[%# this is an individual bread crumb %]
[% BLOCK crumblistitem -%]
-[%- IF item.title -%]
+[%- IF item.exists('title') -%]
<a [% PROCESS "${item.hreftype}ItemHRef" %]>[% item.title | html %]</a>
[%- ELSE -%]
[% item | replace('^\s*/','') %]
Modified: branches/6.5/server/Slim/Display/Lib/Fonts.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Display/Lib/Fonts.pm?rev=11846&r1=11845&r2=11846&view=diff
==============================================================================
--- branches/6.5/server/Slim/Display/Lib/Fonts.pm (original)
+++ branches/6.5/server/Slim/Display/Lib/Fonts.pm Fri Apr 27 17:32:08 2007
@@ -218,7 +218,11 @@
sub string {
my $defaultFontname = shift || return (0, '');
- my $string = shift || return (0, '');
+ my $string = shift;
+
+ if (!defined $string) {
+ return (0, '');
+ }
my $defaultFont = $fonts->{$defaultFontname} || do {
msg(" Invalid font $defaultFontname\n");
Modified: branches/6.5/server/Slim/Music/Info.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Music/Info.pm?rev=11846&r1=11845&r2=11846&view=diff
==============================================================================
--- branches/6.5/server/Slim/Music/Info.pm (original)
+++ branches/6.5/server/Slim/Music/Info.pm Fri Apr 27 17:32:08 2007
@@ -640,7 +640,7 @@
$j = Slim::Utils::Misc::pathFromFileURL($j);
- if ($j && (splitdir($j))[-1]) {
+ if (defined $j && defined ((splitdir($j))[-1])) {
$j = (splitdir($j))[-1];
}
Modified: branches/6.5/server/Slim/Utils/Misc.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Utils/Misc.pm?rev=11846&r1=11845&r2=11846&view=diff
==============================================================================
--- branches/6.5/server/Slim/Utils/Misc.pm (original)
+++ branches/6.5/server/Slim/Utils/Misc.pm Fri Apr 27 17:32:08 2007
@@ -557,8 +557,12 @@
# there's not really a better way to do this..
sub fixPath {
- my $file = shift || return;
+ my $file = shift;
my $base = shift;
+
+ if (!defined($file)) {
+ return;
+ }
my $fixed;
Modified: branches/6.5/server/Slim/Utils/Text.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Utils/Text.pm?rev=11846&r1=11845&r2=11846&view=diff
==============================================================================
--- branches/6.5/server/Slim/Utils/Text.pm (original)
+++ branches/6.5/server/Slim/Utils/Text.pm Fri Apr 27 17:32:08 2007
@@ -35,7 +35,11 @@
=cut
sub ignorePunct {
- my $s = shift || return undef;
+ my $s = shift;
+
+ if (!defined $s) {
+ return undef;
+ }
my $orig = $s;
@@ -58,7 +62,11 @@
=cut
sub matchCase {
- my $s = shift || return undef;
+ my $s = shift;
+
+ if (!defined $s) {
+ return undef;
+ }
# Upper case and fold latin1 diacritical characters into their plain versions, surprisingly useful.
$s =~ tr{abcdefghijklmnopqrstuvwxyzÀÁÂÃÄÅßÞÇ¢ÐÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜ×Ýàáâãäåþçèéêëìíîïñòóôõöøùúûüÿýð¡°}
@@ -86,7 +94,11 @@
=cut
sub ignoreArticles {
- my $item = shift || return;
+ my $item = shift;
+
+ if (!defined $item) {
+ return undef;
+ }
if (!defined($ignoredArticles)) {
@@ -112,7 +124,11 @@
=cut
sub ignoreCaseArticles {
- my $s = shift || return undef;
+ my $s = shift;
+
+ if (!defined $s) {
+ return undef;
+ }
# We don't handle references of any kind.
if (ref($s)) {
More information about the checkins
mailing list