Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
bd8d6497
Commit
bd8d6497
authored
11 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
Provide fallback functions for mbstring module
parent
5aad4829
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bootstrap.php
+27
-0
27 additions, 0 deletions
bootstrap.php
main.inc.php
+1
-0
1 addition, 0 deletions
main.inc.php
with
28 additions
and
0 deletions
bootstrap.php
+
27
−
0
View file @
bd8d6497
...
...
@@ -187,6 +187,33 @@ class Bootstrap {
require
(
INCLUDE_DIR
.
'mysql.php'
);
}
function
i18n_prep
()
{
// MPDF requires mbstring functions
if
(
!
extension_loaded
(
'mbstring'
))
{
if
(
function_exists
(
'iconv'
))
{
function
mb_strpos
(
$a
,
$b
)
{
return
iconv_strpos
(
$a
,
$b
);
}
function
mb_strlen
(
$str
)
{
return
iconv_strlen
(
$str
);
}
function
mb_substr
(
$a
,
$b
,
$c
=
null
)
{
return
iconv_substr
(
$a
,
$b
,
$c
);
}
function
mb_convert_encoding
(
$str
,
$to
,
$from
=
'utf-8'
)
{
return
iconv
(
$from
,
$to
,
$str
);
}
}
else
{
function
mb_strpos
(
$a
,
$b
)
{
return
strpos
(
$a
,
$b
);
}
function
mb_strlen
(
$str
)
{
return
strlen
(
$str
);
}
function
mb_substr
(
$a
,
$b
,
$c
=
null
)
{
return
substr
(
$a
,
$b
,
$c
);
}
function
mb_convert_encoding
(
$str
,
$to
,
$from
=
'utf-8'
)
{
return
iconv
(
$from
,
$to
,
$str
);
}
}
function
mb_strtoupper
(
$a
)
{
return
strtoupper
(
$a
);
}
function
mb_strtolower
(
$a
)
{
return
strtolower
(
$a
);
}
}
else
{
// Use UTF-8 for all multi-byte string encoding
mb_internal_encoding
(
'utf-8'
);
}
}
function
croak
(
$message
)
{
$msg
=
$message
.
"
\n\n
"
.
THISPAGE
;
Mailer
::
sendmail
(
ADMIN_EMAIL
,
'osTicket Fatal Error'
,
$msg
,
...
...
This diff is collapsed.
Click to expand it.
main.inc.php
+
1
−
0
View file @
bd8d6497
...
...
@@ -24,6 +24,7 @@ require('bootstrap.php');
Bootstrap
::
loadConfig
();
Bootstrap
::
defineTables
(
TABLE_PREFIX
);
Bootstrap
::
loadCode
();
Bootstrap
::
i18n_prep
();
Bootstrap
::
connect
();
if
(
!
(
$ost
=
osTicket
::
start
())
||
!
(
$cfg
=
$ost
->
getConfig
()))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment