views:

40

answers:

1

I'm trying to set some configurations for HTMLPurifier, and everything works on my dev machine, but on test, it fails.

with the error Class 'HTMLPurifier_config' not found. but if I remove config, it runs no problem. I'm using HTMLPurifier 4.0.0

    $config=HTMLPurifier_config::createDefault();
        $config->set('AutoFormat','AutoParagraph', true);
        $config->set('AutoFormat','Linkify', true);

 $purifier = new HTMLPurifier($config);

I am loading HTMLPurifier with HTMLPurifier.auto.php, but as I said, this is working in dev, but not testing.

+2  A: 

config needs to be capitalized.

Edward Z. Yang
apparently I had been working off old documentation. Along with config being 'Config', the set is now 'set('AutoFormat.AutoParagraph', true).
pedalpete
config was never lower-cased, but the configuration format has changed recently (the old style still works, it just emits warnings.)
Edward Z. Yang