|
[phpwiki-checkins] CVS: phpwiki/lib stdlib.php,1.148,1.149
From: Geoffrey T. Dairiki <dairiki@us...> - 2003-03-26 19:37
|
Update of /cvsroot/phpwiki/phpwiki/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv8881/lib
Modified Files:
stdlib.php
Log Message:
Fix "object to string conversion" bug with external image links.
Index: stdlib.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/stdlib.php,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -2 -b -p -d -r1.148 -r1.149
--- stdlib.php 25 Mar 2003 21:03:02 -0000 1.148
+++ stdlib.php 26 Mar 2003 19:37:08 -0000 1.149
@@ -192,6 +192,13 @@ function PossiblyGlueIconToText($proto_o
$icon = IconForLink($proto_or_url);
if ($icon) {
+ if (!is_object($text)) {
preg_match('/^\s*(\S*)(.*?)\s*$/', $text, $m);
list (, $first_word, $tail) = $m;
+ }
+ else {
+ $first_word = $text;
+ $tail = false;
+ }
+
$text = HTML::span(array('style' => 'white-space: nowrap'),
$icon, $first_word);
@@ -1293,4 +1300,7 @@ class Alert {
// $Log$
+// Revision 1.149 2003/03/26 19:37:08 dairiki
+// Fix "object to string conversion" bug with external image links.
+//
// Revision 1.148 2003/03/25 21:03:02 dairiki
// Cleanup debugging output.
|
| Thread | Author | Date |
|---|---|---|
| [phpwiki-checkins] CVS: phpwiki/lib stdlib.php,1.148,1.149 | Geoffrey T. Dairiki <dairiki@us...> |