0

Was trying to include a library in a WordPress plugin, and I got

Fatal error: Cannot redeclare js_escape() (previously declared in .../wp-includes/deprecated.php:2053) in .../plugins/my-plugin/lib/a-library.php on line ...

Is there a way to overcome the symbol clash, without tweaking the library source code ? I surely don't want to touch WordPress code, but the library is small enough to be patched, if it's the only way

CapelliC
  • 59,646
  • 5
  • 47
  • 90
  • Possible duplicate of https://stackoverflow.com/questions/3620659/is-it-possible-to-overwrite-a-function-in-php – salvatore Jan 30 '19 at 22:59
  • Possible duplicate of [Is it possible to overwrite a function in PHP](https://stackoverflow.com/questions/3620659/is-it-possible-to-overwrite-a-function-in-php) – salvatore Jan 30 '19 at 23:00

0 Answers0