Coder Social home page Coder Social logo

PHP 7.2 Warnings about concrete5-legacy HOT 8 CLOSED

ConcreteOwl avatar ConcreteOwl commented on June 27, 2024
PHP 7.2 Warnings

from concrete5-legacy.

Comments (8)

mlocati avatar mlocati commented on June 27, 2024

These are constants (so they must not be enclosed in quotes) that are defined in the concrete/config/app.php file.
This file is not executed (so, these constants are not defined) only if the $config_check_failed global variable is set to false, and this case should occur only if concrete5 is not installed (see the concrete/startup/config_check.php file).

from concrete5-legacy.

ConcreteOwl avatar ConcreteOwl commented on June 27, 2024

Here are the warnings found in the PHP Error log..
[28-Dec-2017 10:01:20 UTC] PHP Warning: Use of undefined constant ENABLE_INTELLIGENT_SEARCH_HELP - assumed 'ENABLE_INTELLIGENT_SEARCH_HELP' (this will throw an Error in a future version of PHP) in H:\wamp\www\newsite\concrete\helpers\concrete\dashboard.php on line 405
[28-Dec-2017 10:01:20 UTC] PHP Warning: Use of undefined constant ENABLE_INTELLIGENT_SEARCH_MARKETPLACE - assumed 'ENABLE_INTELLIGENT_SEARCH_MARKETPLACE' (this will throw an Error in a future version of PHP) in H:\wamp\www\newsite\concrete\helpers\concrete\dashboard.php on line 413
[28-Dec-2017 10:01:20 UTC] PHP Warning: Use of undefined constant ENABLE_MARKETPLACE_SUPPORT - assumed 'ENABLE_MARKETPLACE_SUPPORT' (this will throw an Error in a future version of PHP) in H:\wamp\www\newsite\concrete\helpers\concrete\dashboard.php on line 525

So, would you say that PHP 7.2 has a bug?

from concrete5-legacy.

mlocati avatar mlocati commented on June 27, 2024

So, would you say that PHP 7.2 has a bug?

No, I'm saying that I don't understand why you have those undefined constants.

from concrete5-legacy.

ConcreteOwl avatar ConcreteOwl commented on June 27, 2024

Well this is odd..
From a fresh install of 5.6.4.0 on completion of the install I am auto signed into the site..
I hover my cursor over the Dashboard link at the top of the page and I see the warning displayed in the popup.
I check the PHP error log files and see those three warnings as per my previous post.
If I sign out of the site and then sign back in again and hover my cursor over the Dashboard link, the warning does not appear in the popup!
Also, the warnings in the PHP error log are not repeated!
Any Idea what is happening here?

from concrete5-legacy.

mlocati avatar mlocati commented on June 27, 2024

Any Idea what is happening here?

Yes: the result of the getDashboardAndSearchMenus method (where the affected lines are executed) is stored in a cache. So, next calls to that method in the same session won't cause the warnings to be thrown.

from concrete5-legacy.

mlocati avatar mlocati commented on June 27, 2024

I may have understood why we have those warnings: see #1969

from concrete5-legacy.

ConcreteOwl avatar ConcreteOwl commented on June 27, 2024

Yes Mike your modifications to the concrete/helpers/concrete/interface.php file has fixed this issue.
I just tested this in another install and I no longer see any warnings.
Well done.

from concrete5-legacy.

mlocati avatar mlocati commented on June 27, 2024

Thanks for checking!

from concrete5-legacy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.