Closed mkdgs closed 11 years ago
Hello. I'm trying to reproduce this locally in my test setup. Can you show me the arguments you are using to call TextileThis() please?
ok ! i know why you can't reproduce that, i used error_handler and this break @ silence opérator.
require_once('classTextile.php');
ini_set('error_reporting', -1);
ini_set('display_errors', 1);
ini_set('html_errors', 1);
function error_( $number, $message, $file, $line ) {
$error = array( 'type' => $number, 'message' => $message, 'file' => $file, 'line' => $line );
print_r( $error );
}
set_error_handler('error_');
$txt = '
===
foo
====
';
$textile = new Textile();
echo $textile->TextileThis($txt);
sorry it's due by my developpement environement, but i think array_pad is a better practice.
Ok, looking at this right now and removing the @ allows it to manifest clearly. I'll probably pad with '' (empty string) rather than null here.
textile code like : =.=.= (remove . between =) =.=.=.=
generate error in strict mode (undefined offset). use of array_pad to avoid that. (it's maybe also a good idea to apply array_pad on all list() in this class)