Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Избавится от ReflectionTypeHint! #5

Open
GoogleCodeExporter opened this issue Nov 18, 2015 · 1 comment
Open

Избавится от ReflectionTypeHint! #5

GoogleCodeExporter opened this issue Nov 18, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Эта глючная библиотека совершенно 
безполезна и только мешает:
$mat = Text_Censure::parse($text,
            $delta = 3,
            $continue = "\xe2\x80\xa6",
            $is_html = false);

Выдаёт:

PHP Error [512]
Argument 2 passed to Text_Censure::parse() must be an string, integer given, 
called in Z:\home\xu.su.loc\www\send.php on line 32 
and defined in Z:\home\xu.su.loc\www\lib\censure\Text\Censure.php on line 52 
(Z:\home\xu.su.loc\www\lib\censure\ReflectionTypeHint.php:107)
#0 Z:\home\xu.su.loc\www\lib\censure\Text\Censure.php(60): isValid()

Original issue reported on code.google.com by [email protected] on 12 Feb 2012 at 6:15

@GoogleCodeExporter
Copy link
Author

Определите типы напрямую. Вставьте после 
"function parse(
        $s,
        $delta = 3,
        $continue = "o",
        $is_html = true,
        $replace = 'OOO',
        $charset = 'UTF-8')
    {
" следующий код:
$s = (string) $s;
$delta = (string) $delta;
$continue = (string) $continue;
$is_html = (bool) $is_html; 

в файле Censure.php

Original comment by [email protected] on 7 Jan 2015 at 2:31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant