bootstrap文档报错的解决办法
warning: preg_match() expects parameter 2 to be string, resource given in /var/www/includes/bootstrap.inc on line 777
解决办法:
diff -r1.1 /var/www/includes/bootstrap.inc
741c741,742
< return drupal_validate_utf8($text) ? htmlspecialchars($text, ENT_QUOTES) : '';
---
> return drupal_validate_utf8($text) ? htmlspecialchars((string)$text, ENT_QUOTES) : '';
777c778,779
< return (preg_match('/^./us', $text) == 1);
---
> return (preg_match('/^./us', (string) $text) == 1);
解决办法:
diff -r1.1 /var/www/includes/bootstrap.inc
741c741,742
< return drupal_validate_utf8($text) ? htmlspecialchars($text, ENT_QUOTES) : '';
---
> return drupal_validate_utf8($text) ? htmlspecialchars((string)$text, ENT_QUOTES) : '';
777c778,779
< return (preg_match('/^./us', $text) == 1);
---
> return (preg_match('/^./us', (string) $text) == 1);
下一篇: 构建Drupal系统wiki功能的模块