Posts: 105
Threads: 10
Joined: Dec 2009
Hello,
I update my test environement and this :
Code: Warning: htmlspecialchars() expects at most 3 parameters, 4 given in /mnt/101/sda/5/d/lriaudel/gs/admin/inc/basic.php on line 471
Warning: htmlspecialchars() expects at most 3 parameters, 4 given in /mnt/101/sda/5/d/lriaudel/gs/admin/inc/basic.php on line 471
Warning: htmlspecialchars() expects at most 3 parameters, 4 given in /mnt/101/sda/5/d/lriaudel/gs/admin/inc/basic.php on line 471
Posts: 3,491
Threads: 106
Joined: Mar 2010
madvic Wrote:Code: Warning: htmlspecialchars() expects at most 3 parameters, 4 given in /.../gs/admin/inc/basic.php on line 471
The 4th parameter for htmlspecialchars was added in PHP 5.2.3. Madvic is probably using an older version.
If you want GS to be compatible with those PHP versions, it may be fixed by editing admin/inc/basic.php, line 471, changing:
Code: $text = htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false);
to:
Code: $text = str_replace('"', '"', str_replace("'", ''', $text) );
(I hope it doesn't break anything. It should do the same, though maybe uglier)
Posts: 105
Threads: 10
Joined: Dec 2009
Ohhhh, I'm so stupid !
It's a php function. I thought it was getsimple.
Thanks.
Posts: 3,491
Threads: 106
Joined: Mar 2010
madvic Wrote:Ohhhh, I'm so stupid ! Not at all madvic, you found an issue!
BTW it's my fault: I had suggested the changes for that line in the code.
Now it has to be changed in some way (maybe like what I suggested above, can you test it?) or else the minimum PHP version required for GS 3.1 will be 5.2.3.
Posts: 1,848
Threads: 86
Joined: Aug 2009
Carlos Wrote:Now it has to be changed in some way (maybe like what I suggested above, can you test it?) or else the minimum PHP version required for GS 3.1 will be 5.2.3. Could we just wrap it in a PHP version if statement and if it is earlier than 5.2.3, dont include that 4th parameter?
- Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 3,491
Threads: 106
Joined: Mar 2010
ccagle8 Wrote:Could we just wrap it in a PHP version if statement and if it is earlier than 5.2.3, dont include that 4th parameter? Yes, nice idea. I think that would work with no major problems.
Anyway I'll do some test later at home and tell you...
Posts: 2,094
Threads: 54
Joined: Jan 2011
BTW: Please change the error message CANNOT_SAVE_EMPTY from "You cannot save an empty page" to the real problem, which - as far as I know - is the empty page slug, which itself is caused by an empty title or an all-non-latin title (that translates into an empty page slug).
Two error messages would be nice: "Please enter a title" - if the title is empty - and - if there is no slug and a title which translates to an empty slug - "Please open the page options and enter a slug name"
Posts: 3,491
Threads: 106
Joined: Mar 2010
@mvlcek
Or maybe just change the error to "You cannot save a page with no title (or slug)" ?
BTW you lose the body content when this happens... That would make another issue, but perhaps it's a bit late, maybe for 3.2...
Posts: 3,491
Threads: 106
Joined: Mar 2010
ccagle8 Wrote:Could we just wrap it in a PHP version if statement and if it is earlier than 5.2.3, dont include that 4th parameter?
Done some tests. If you do it that way, sites on PHP<5.2.3 will have (again) over-encoded html entities in their meta desc, keywords and menu link title attribute, e.g. © is rendered as &copy;
Better than stopping with an error, of course... :-)
Posts: 6,266
Threads: 181
Joined: Sep 2011
Not major, and not something alot of people would do, but if you rename a plugin file.
You get a ton of errors. But I have some conflicting filename plugins from extend i was trying to install.
( they really should use a unique forced prefix naming convention, perhaps extend user id or something )
Then load plugings you get
Code: Notice: Undefined index: name.php in plugins.php
blah.... etc
I imagine this is because the filecount is still the same, so perhaps a missing index can be treated as a change and cause a rescan of plugins. This doesn't happen when you delete a file.
Also I dont know how plugins are getting the plugin name and linking to extend, it seems to be using the filename somehow and not the plugins registered name, which just seems odd and causes renaming plugins to break the title in plugins list.
Posts: 1,848
Threads: 86
Joined: Aug 2009
madvic/carlos & mvlcek : Changes have been made here. Madvic, can you replace the code in basic.php that changed and see if that allows you to use GS? http://code.google.com/p/get-simple-cms/...tail?r=663
- Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 1,848
Threads: 86
Joined: Aug 2009
marcco: what is showing when it doesnt work?
- Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 149
Threads: 12
Joined: Dec 2009
2012-02-22, 03:35:19
(This post was last modified: 2012-02-22, 03:35:38 by alex.drag.)
ccagle8 Wrote:marcco: what is showing when it doesnt work?
sorry, bug fixed. My Chrome had problems, doing a reboot solved the issue of "browse server" popup window not appearing.
Confirmed working, problem was between keyboard and chair
Posts: 1,848
Threads: 86
Joined: Aug 2009
marrco Wrote:Confirmed working, problem was between keyboard and chair haha, good to know... thanks for checking back in
- Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
|