Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
retypos-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eterfund
retypos-server
Commits
1edce730
Commit
1edce730
authored
Jun 05, 2017
by
Георгий Попов
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change strlen to mb_strlen. Cause string in multibyte
parent
11edefc2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
functions.php
functions.php
+4
-4
Typo.php
new_cp/application/models/Typo.php
+0
-2
No files found.
functions.php
View file @
1edce730
...
...
@@ -116,13 +116,13 @@ function validate() {
return
false
;
}
if
(
strlen
(
getRequest
(
'text'
,
''
))
<
5
||
strlen
(
getRequest
(
'text'
,
''
))
>
30
)
{
$error
=
sprintf
(
$_language
[
$code_language
][
"error_text"
],
5
,
30
,
strlen
(
getRequest
(
'text'
,
''
)));
if
(
mb_strlen
(
getRequest
(
'text'
,
''
))
<
5
||
mb_
strlen
(
getRequest
(
'text'
,
''
))
>
30
)
{
$error
=
sprintf
(
$_language
[
$code_language
][
"error_text"
],
5
,
30
,
mb_
strlen
(
getRequest
(
'text'
,
''
)));
return
false
;
}
if
(
strlen
(
getRequest
(
'comment'
,
''
))
>
30
)
{
$error
=
sprintf
(
$_language
[
$code_language
][
"error_text"
],
0
,
30
,
strlen
(
getRequest
(
'comment'
,
''
)));
if
(
mb_
strlen
(
getRequest
(
'comment'
,
''
))
>
30
)
{
$error
=
sprintf
(
$_language
[
$code_language
][
"error_text"
],
0
,
30
,
mb_
strlen
(
getRequest
(
'comment'
,
''
)));
return
false
;
}
return
true
;
...
...
new_cp/application/models/Typo.php
View file @
1edce730
...
...
@@ -212,8 +212,6 @@ class Typo extends CI_Model {
$this
->
db
->
where
(
"id"
,
$data
[
'id_message'
]);
$this
->
db
->
where
(
"site_id"
,
$data
[
'id_site'
]);
$this
->
db
->
update
(
"messages"
);
log_message
(
"error"
,
"editMessage:
{
$this
->
db
->
last_query
()
}
"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment