Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vtigercrm
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Welcome to Vtiger Community. To gain access for account, please contact [ community @ vtiger.com ]
Show more breadcrumbs
Code80
vtigercrm
Commits
84df3ca6
Commit
84df3ca6
authored
8 years ago
by
Prasad
Browse files
Options
Downloads
Patches
Plain Diff
Added ereg* backward compatability for php7.
parent
c046958a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/utils/utils.php
+10
-7
10 additions, 7 deletions
include/utils/utils.php
with
10 additions
and
7 deletions
include/utils/utils.php
+
10
−
7
View file @
84df3ca6
...
...
@@ -2321,13 +2321,16 @@ function php7_compat_split($delim, $str, $ignore_case=false) {
return
$splits
;
}
if
(
!
function_exists
(
'split'
))
{
function
split
(
$delim
,
$str
)
{
return
php7_compat_split
(
$delim
,
$str
);
}
}
if
(
!
function_exists
(
'spliti'
))
{
function
spliti
(
$delim
,
$str
)
{
return
php7_compat_split
(
$delim
,
$str
,
true
);
}
if
(
!
function_exists
(
'split'
))
{
function
split
(
$delim
,
$str
)
{
return
php7_compat_split
(
$delim
,
$str
);
}
}
if
(
!
function_exists
(
'spliti'
))
{
function
spliti
(
$delim
,
$str
)
{
return
php7_compat_split
(
$delim
,
$str
,
true
);}}
function
php7_compat_ereg
(
$pattern
,
$str
,
$ignore_case
=
false
)
{
$regex
=
'/'
.
preg_replace
(
'/\//'
,
'\\/'
,
$pattern
)
.
'/'
.
(
$ignore_case
?
'i'
:
''
);
return
preg_match
(
$regex
,
$str
);
}
if
(
!
function_exists
(
'ereg'
))
{
function
ereg
(
$pattern
,
$str
)
{
return
php7_compat_ereg
(
$pattern
,
$str
);
}
}
if
(
!
function_exists
(
'eregi'
))
{
function
ereg
(
$pattern
,
$str
)
{
return
php7_compat_ereg
(
$pattern
,
$str
,
true
);
}
}
?>
\ No newline at end of file
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