Closed r-a-y closed 7 years ago
Thanks, @r-a-y. I've fixed three of the four errors. The third one will be harder:
Line 1531: Removed regular expression modifier "e" used
I think that fixing this will require rewriting as preg_replace_callback()
. Do we have any sense of where/when this function might be called? What is the purpose of the Textile
parser?
Thanks for looking into this, @boonebgorges.
I think the Textile
code has something to do with the Markdown parser used on the "Dev Docs" section of the "Appearance > CBOX Theme Options" admin page.
In case anyone ever wants to verify 6b98ee3, here were my two testcases:
require_once 'wp-content/themes/cbox-theme/engine/ICE/lib/textile/classTextile.php';
$t = new Textile();
$text = 'footnote foo[10] bar';
$found = $t->footnoteRef( $text );
var_Dump( $found );
$text = 'footnote foo[10!] bar';
$found = $t->footnoteRef( $text );
var_Dump( $found );
I've reviewed the warnings and I think we can probably safely avoid them. They're all related to reference-vs-value issues, and while there's no way I can audit the whole codebase to ensure that we're not modifying items that are being returned by reference, the risk in these specific cases seems pretty low when compared to the amount of refactoring that'd have to take place to remove them.
Going to close as fixed.
As raised on the cbox.org forums, there are some PHP7 compatibility issues.
I've run cbox-theme through php7cc (stable version) and these are the errors that need to be fixed up:
Warnings: