CRM-20932 - CRM_Utils_System_Joomla - Fix warning. Define JDEBUG
authorTim Otten <totten@civicrm.org>
Fri, 21 Jul 2017 02:53:38 +0000 (19:53 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 21 Jul 2017 02:53:38 +0000 (19:53 -0700)
commita52917776bd4949da8d24cb04d31197a8f91c300
tree366d2a2348b312710129533cee8b0b65598ef2c7
parent79ce1b551d7f2cb767c8fb94523500b45fec4dd1
CRM-20932 - CRM_Utils_System_Joomla - Fix warning. Define JDEBUG

Background
==========

When running `cv en <extname>` on Joomla, there are repeated warnings, "Use
of undefined constant JDEBUG", and each includes a backtrace.  This is hard
to read.

The bug appears to affect backend scripts; it's discussed with a solution in:

https://github.com/joomla/joomla-cms/issues/11512#issuecomment-244937966

Before
======

`CRM_Utils_System_Joomla::loadBootStrap()` loads various config files.
However, these may or may not set `JDEBUG`.

After
=====

`CRM_Utils_System_Joomla::loadBootStrap()` defensively sets `JDEBUG` if no
other part of the bootstrap has done so.
CRM/Utils/System/Joomla.php