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

Titles do not work on HHVM #43

Open
Rotonen opened this issue Sep 11, 2015 · 0 comments
Open

Titles do not work on HHVM #43

Rotonen opened this issue Sep 11, 2015 · 0 comments

Comments

@Rotonen
Copy link

Rotonen commented Sep 11, 2015

HHVM seems a bit stricter about what you can pass around as constants and how.

Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 74
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 77
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 80
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 86
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 83
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 110
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 113
Warning: Constants may only evaluate to scalar values in /var/www/<redacted>/index.php on line 89

define("COMPANY_TITLE", $child);

This leads into trouble displaying some of the titles from the xml file.

Notice: Use of undefined constant COMPANY_TITLE - assumed 'COMPANY_TITLE' in /var/www/<redacted>/index.php on line 213
Notice: Use of undefined constant COMPANY_TITLE - assumed 'COMPANY_TITLE' in /var/www/<redacted>/index.php on line 222
Notice: Use of undefined constant COMPANY_WEBSITE - assumed 'COMPANY_WEBSITE' in /var/www/<redacted>/index.php on line 223
Notice: Use of undefined constant COMPANY_WEBSITE - assumed 'COMPANY_WEBSITE' in /var/www/<redacted>/index.php on line 223
Notice: Use of undefined constant COMPANY_TITLE - assumed 'COMPANY_TITLE' in /var/www/<redacted>/index.php on line 265
Notice: Use of undefined constant COMPANY_BASED - assumed 'COMPANY_BASED' in /var/www/<redacted>/index.php on line 266
Notice: Use of undefined constant COMPANY_DATE - assumed 'COMPANY_DATE' in /var/www/<redacted>/index.php on line 270
Notice: Use of undefined constant COMPANY_WEBSITE - assumed 'COMPANY_WEBSITE' in /var/www/<redacted>/index.php on line 274
Notice: Use of undefined constant COMPANY_WEBSITE - assumed 'COMPANY_WEBSITE' in /var/www/<redacted>/index.php on line 274
Notice: Use of undefined constant COMPANY_CONTACT - assumed 'COMPANY_CONTACT' in /var/www/<redacted>/index.php on line 278
Notice: Use of undefined constant COMPANY_CONTACT - assumed 'COMPANY_CONTACT' in /var/www/<redacted>/index.php on line 278
Notice: Use of undefined constant COMPANY_PHONE - assumed 'COMPANY_PHONE' in /var/www/<redacted>/index.php on line 323
Notice: Use of undefined constant COMPANY_DESCRIPTION - assumed 'COMPANY_DESCRIPTION' in /var/www/<redacted>/index.php on line 328
Notice: Use of undefined constant COMPANY_TITLE - assumed 'COMPANY_TITLE' in /var/www/<redacted>/index.php on line 467
Notice: Use of undefined constant COMPANY_TITLE - assumed 'COMPANY_TITLE' in /var/www/<redacted>/index.php on line 499

Which leads into COMPANY_TITLE and the others to bleed onto the final result page instead of the parsed results.

The suggestion from the HHVM devs is to cast $child into string every time it gets used. They suspect that is what Zend is doing under the table silently and why it works in mainline PHP.

define("GAME_TITLE", (string)$child);

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

No branches or pull requests

1 participant