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

php7.4 deprecated syntax notices which cause output before session start #25834

Closed
stAn47 opened this issue Aug 13, 2019 · 13 comments
Closed

php7.4 deprecated syntax notices which cause output before session start #25834

stAn47 opened this issue Aug 13, 2019 · 13 comments

Comments

@stAn47
Copy link

stAn47 commented Aug 13, 2019

i just got to check php7.4 and all of my code base and there seems to be some deprecated systax used by core joomla which causes error/notice messages to be shown (when error reporting enabled) which breaks session initalization which further breaks joomla execution.

these are notices before session is initilized

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/vendor/joomla/string/src/phputf8/ord.php on line 23

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/vendor/joomla/string/src/phputf8/ord.php on line 28

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/vendor/joomla/string/src/phputf8/ord.php on line 34

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/vendor/joomla/string/src/phputf8/ord.php on line 38

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/vendor/joomla/string/src/phputf8/ord.php on line 45

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/vendor/joomla/string/src/phputf8/ord.php on line 49

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/vendor/joomla/string/src/phputf8/ord.php on line 58

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/vendor/joomla/string/src/phputf8/ord.php on line 62

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/vendor/joomla/string/src/phputf8/ord.php on line 71

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/vendor/joomla/string/src/phputf8/ord.php on line 81

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/vendor/joomla/string/src/phputf8/utils/validation.php on line 40

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/vendor/typo3/phar-stream-wrapper/src/PharStreamWrapper.php on line 479

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/joomla/database/driver.php on line 1956

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/joomla/database/driver.php on line 1956

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/joomla/database/driver.php on line 1956

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/joomla/database/driver.php on line 1956

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/joomla/database/driver.php on line 1956

Deprecated: Array and string offset access syntax with curly braces is deprecated in  /libraries/joomla/database/driver.php on line 2032

per my understanding of the problem, strings cannot be accessed with $str{1} but require to be accessed via $str[1]

i cannot get further since enabling error reporting breaks joomla and thus i cannot locate more of these now.

best regards, stan

@ghost
Copy link

ghost commented Aug 13, 2019

i guess J4?

@stAn47
Copy link
Author

stAn47 commented Aug 13, 2019

no, this on the latest j3.9.11
or is php7.4 going to be added only for j4 and later ?

well, i just checked :

https://github.com/joomla/joomla-cms/blob/staging/libraries/vendor/joomla/string/src/phputf8/ord.php
vs
https://github.com/joomla-framework/string/blob/master/src/phputf8/ord.php

and it seems that the issue is fixed on "joomla framework" but not within the latest j3 version.

is there any reason for this ?

best regards, stan

@ghost ghost added the J3 Issue label Aug 13, 2019
@ghost
Copy link

ghost commented Aug 13, 2019

thanks for Info. Please provide always System Informations.

@mbabker
Copy link
Contributor

mbabker commented Aug 13, 2019

libraries/joomla/database/driver.php needs a patch similar to joomla-framework/database@486f073 (which I needed because the Framework apps that power parts of joomla.org were failing their test suites on 7.4).

A new release of the joomla/string package is needed then a composer update joomla/string is needed for the CMS.

The PHAR wrapper is not PHP 7.4 ready yet, TYPO3/phar-stream-wrapper#49

@alikon
Copy link
Contributor

alikon commented Aug 14, 2019

please test #25782 for 1st point
still left to do joomla/string ...

@wilsonge
Copy link
Contributor

String package released as version 1.4.3

@richard67
Copy link
Member

I will make PR for composer update of string package tonight Central European summer time. If someone else wants to do this earlier then let us know here so we don‘t do double work.

@SharkyKZ
Copy link
Contributor

@richard67 There's already PR open #25601. I'll update it.

@richard67
Copy link
Member

@SharkyKZ Thanks for info and PR.

@ghost
Copy link

ghost commented Aug 14, 2019

@SharkyKZ can this Issue be closed?

@SharkyKZ
Copy link
Contributor

@franz-wohlkoenig I'd keep this open until Phar Stream Wrapper update is released.

@SharkyKZ
Copy link
Contributor

Test PR #26862 please.

@joomla-cms-bot
Copy link

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

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

7 participants