SAFE_MODE workaround

Discuss the development of future releases of phpBB (phpBB 3.x minor releases) and MODing/Coding related questions.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

SAFE_MODE workaround

Postby Obsidian » 03 Jun 2008, 13:24


User avatar
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: SAFE_MODE workaround

Postby igorw » 03 Jun 2008, 14:19

It always helps to post the whole code, so we know what you're talking about.

The great thing about php's safe mode that it's not safer than the normal mode and that it applies very many limitations into a programmer. :D

I'm assuming you are using the imagettftext() function. The [url=http://php.net/manual/en/function.imagettftext.php]php manual page[/url] is the one that has the code you are using. I've tested it, and the putenv is not needed. The text at the manual implies that it's only required for some old GD versions. You should be fine with leaving it out.

- we're poor!

User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: SAFE_MODE workaround

Postby Obsidian » 03 Jun 2008, 15:08

Yes, I'm using inmagettftext()...and yes that is the snippet.

I'll try to use it on my test setup without it and get back to you.

EDIT: It worked! Thanks evil! :)

I guess I have to update my MODX file now and XSL. :D


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “phpBB Development discussion”

Who is online

Users browsing this forum: No registered users and 2 guests