Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of undefined constant JDEBUG #23699

Closed
dioubernardo opened this issue Jan 28, 2019 · 6 comments
Closed

Use of undefined constant JDEBUG #23699

dioubernardo opened this issue Jan 28, 2019 · 6 comments

Comments

@dioubernardo
Copy link

dioubernardo commented Jan 28, 2019

Steps to reproduce the issue

-- crop.php

const _JEXEC = 1;

if (!defined('_JDEFINES')){
    define('JPATH_BASE', dirname(__DIR__));
    require_once JPATH_BASE . '/includes/defines.php';
}

require_once JPATH_LIBRARIES . '/import.legacy.php';
require_once JPATH_LIBRARIES . '/cms.php';
require_once JPATH_CONFIGURATION . '/configuration.php';
require_once JPATH_BASE . '/includes/framework.php';

class CronFURG extends JApplicationCli{

	public function doExecute(){
		...
	}
}

JApplicationCli::getInstance('CronFURG')->execute();
php cron.php

Expected result

No result

Actual result

PHP Warning: Use of undefined constant JDEBUG - assumed 'JDEBUG' (this will throw an Error in a future version of PHP) in /storage/htdocs/joomla/ppgbaac/libraries/src/Version.php on line 327

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/23699

@N6REJ
Copy link
Contributor

N6REJ commented Sep 5, 2019

@franz-wohlkoenig REOPEN THIS PLEASE
as of 3.9.11 this is still occurring
image
the "hi" is the jdebug working but it's throwing the warning.

@ghost ghost reopened this Sep 5, 2019
@ghost ghost added the J3 Issue label Sep 5, 2019
@N6REJ
Copy link
Contributor

N6REJ commented Sep 5, 2019

This solves the issue which is strange since it thinks there is no jdebug constant.

<jdoc:include type="modules" name="debug" style="none"/>
<!--  If JDEBUG is defined, load the css -->
<?php if (defined('JDEBUG') && JDEBUG)
{
	HTMLHelper::_( 'stylesheet', '/framework/debug.css', $HTMLHelperDebug );
}
?>

@mbabker
Copy link
Contributor

mbabker commented Sep 6, 2019

Constants are case sensitive so your warning is correct because Joomla does not create mixed case constants.

I’m also not quite sure how this qualifies to re-open an issue when both the source path of the error and the way of triggering it have nothing to do with the original report. A similar error message does not equate to the same “bug”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants