Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r23048: make this warning more clear

Committer: ailyin
make this warning more clear
U   trunk/cgi-bin/LJ/Text.pm
Modified: trunk/cgi-bin/LJ/Text.pm
===================================================================
--- trunk/cgi-bin/LJ/Text.pm	2012-10-04 08:22:07 UTC (rev 23047)
+++ trunk/cgi-bin/LJ/Text.pm	2012-10-04 09:11:43 UTC (rev 23048)
@@ -169,8 +169,10 @@
     cluck "unknown options: " . Dumper(\%opts)
         if %opts;
 
-    cluck "not actually truncating"
-        unless $bytes || $chars;
+    unless ( $bytes || $chars ) {
+        cluck "not actually truncating: no 'bytes' or 'chars' " .
+            "parameter passed to LJ::Text::truncate";
+    }
 
     $str = $class->truncate_to_bytes($str, $bytes) if $bytes;
     $str = $class->truncate_to_chars($str, $chars) if $chars;

Tags: ailyin, andy, livejournal, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments