Skip to content

Commit 7ccfc21

Browse files
author
Ciaran McCrisken
committed
(MODULES_10899) Use versioncmp function for $php_version
Also remove restriction on tests so they execute on SLES platforms
1 parent 6304219 commit 7ccfc21

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

manifests/mod/php.pp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#
44
# @todo
55
# Add docs
6-
# @note Unsupported platforms: SLES: all
76
class apache::mod::php (
87
$package_name = undef,
98
$package_ensure = 'present',
@@ -17,7 +16,7 @@
1716
$libphp_prefix = 'libphp'
1817
) inherits apache::params {
1918
include apache
20-
if $php_version <= '7' {
19+
if (versioncmp($php_version, '7') <= 0) {
2120
$mod = "php${php_version}"
2221
} else {
2322
$mod = "php"
@@ -79,7 +78,7 @@
7978
id => "php${_php_major}_module",
8079
path => "${apache::lib_path}/mod_${mod}.so",
8180
}
82-
} elsif $php_version <= '7' {
81+
} elsif (versioncmp($php_version, '7') <= 0) {
8382
::apache::mod { $mod:
8483
package => $_package_name,
8584
package_ensure => $package_ensure,

0 commit comments

Comments
 (0)