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

Replace Functions Deprecated By PHP 7.2 #382

Closed
54 opened this Issue Jan 3, 2018 · 9 comments

Comments

Projects
None yet
7 participants
@54
Copy link

54 commented Jan 3, 2018

Expected Behavior

SourceBans, ideally, should not be using any deprecated functions provided by PHP.

Current Behavior

When the Smarty compiler is called, you'll get deprecation notices for "create_function()" and "each()" on lines 269 and 559 of Smarty_Compiler.class.php, respectively.

Possible Solution

A. Update Smarty to the latest version of Smarty 2

B. Patch the deprecated functions with the code provided here: smarty-php/smarty@4ab9757

Steps to Reproduce (for bugs)

  1. Install PHP 7.2
  2. Install SourceBans++
  3. Visit homepage

Your Environment

@rumblefrog

This comment has been minimized.

Copy link
Member

rumblefrog commented Jan 4, 2018

Ideally, that's what we want, but most of the users are on PHP 5.X still.

@CrazyHackGUT

This comment has been minimized.

Copy link
Contributor

CrazyHackGUT commented Jan 4, 2018

@rumblefrog this changes will not break compatibility with PHP 5.X.

@Groruk

This comment has been minimized.

Copy link
Member

Groruk commented Jan 4, 2018

Problem is that not only smarty contains deprecated functions, but also ADODB and probably also Xajax. So it will take more effort than that to make SourceBans++ ready for PHP 7.2

@54

This comment has been minimized.

Copy link

54 commented Jan 4, 2018

@Groruk Yeah, I was looking yesterday. It shouldn't be a massive job, though. It looks like the majority are each() calls in adodb.

@rumblefrog

This comment has been minimized.

Copy link
Member

rumblefrog commented Jan 4, 2018

@CrazyHackGUT I know it won't, but most users are on PHP 5.X, it wouldn't make sense to focus on something when only around 5% of the users experience this issue.

@whocodes

This comment has been minimized.

Copy link

whocodes commented Jan 4, 2018

5% of users is still an incredibly large amount of users

@rumblefrog

This comment has been minimized.

Copy link
Member

rumblefrog commented Jan 4, 2018

@whocodes But it would make sense to focus on something 90% of the people are experiencing right?

@filipnyquist

This comment has been minimized.

Copy link

filipnyquist commented Jan 14, 2018

No, it would make sense to follow the PHP schedule of updates. ;)

@caxanga334

This comment has been minimized.

Copy link

caxanga334 commented Jan 15, 2018

https://secure.php.net/supported-versions.php
PHP 5.X will reach EOL in 11 months.

@Groruk Groruk referenced this issue Jan 19, 2018

Merged

1.6.3-PRE #387

@Groruk Groruk closed this in #387 Jan 19, 2018

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