Skip to content

Commit c175617

Browse files
committed
Merge branch 'master' of https://git.php.net/repository/php-src
# By Adam Harvey (1) and Anatol Belski (1) # Via Adam Harvey (3) and others * 'master' of https://git.php.net/repository/php-src: Fix the broken sh syntax in ext/imap/config.m4. Fixed bug #65678 the test cli_process_title_windows will fails on particular environnement
2 parents dcafcd0 + 9e3bedc commit c175617

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

ext/imap/config.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ if test "$PHP_IMAP" != "no"; then
198198
AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
199199
fi
200200

201-
if test ! -r "$IMAP_DIR/c-client/libc-client.a" && -r "$IMAP_DIR/c-client/c-client.a" ; then
201+
if test ! -r "$IMAP_DIR/c-client/libc-client.a" && test -r "$IMAP_DIR/c-client/c-client.a" ; then
202202
ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
203-
elif test ! -r "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" && -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then
203+
elif test ! -r "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" && test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then
204204
ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1
205205
fi
206206

sapi/cli/tests/cli_process_title_windows.phpt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')
2020
// no warnings/errors.
2121

2222
$is_windows8 = false;
23-
$ps_output = shell_exec("PowerShell \"(Get-Host).UI.RawUI.WindowTitle\"");
23+
$ps_output = shell_exec("PowerShell -NoProfile \"(Get-Host).UI.RawUI.WindowTitle\"");
2424
if ($ps_output === null)
2525
{
2626
echo "Get-Host failed\n";
2727
die();
2828
}
2929

3030
$ps_output = trim($ps_output);
31-
if (($ps_output == "Windows PowerShell") || ($ps_output == "Administrator: Windows PowerShell"))
31+
$end_title_windows8 = ": Windows PowerShell";
32+
if (($ps_output == "Windows PowerShell") || (strlen($ps_output) > strlen($end_title_windows8) && substr($ps_output,-strlen($end_title_windows8)) === $end_title_windows8))
3233
$is_windows8 = true;
3334

3435
echo "*** Testing setting the process title ***\n";
@@ -45,7 +46,7 @@ if ($is_windows8)
4546
}
4647
else
4748
{
48-
$loaded_title = shell_exec("PowerShell \"get-process cmd*,powershell* | Select-Object mainWindowTitle | ft -hide\"");
49+
$loaded_title = shell_exec("PowerShell -NoProfile \"get-process cmd*,powershell* | Select-Object mainWindowTitle | ft -hide\"");
4950

5051
if ($loaded_title === null)
5152
{

0 commit comments

Comments
 (0)