Skip to content

Commit 2d2d7a1

Browse files
committed
Small modification for checking code analyzer.
1 parent 7beed8f commit 2d2d7a1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

samples/FMDataAPI_Sample.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// Instantiate the class FMDataAPI with database name, username, password and host.
2020
// Although the port number and protocol can be set in parameters of constructor,
2121
// these parameters can be omitted with default values.
22-
$fmdb = new FMDataAPI("TestDB", "web", null, "localhost");
22+
$fmdb = new FMDataAPI("TestDB", "web", "password", "localhost");
2323

2424
//==============================
2525
//$fmdb = new FMDataAPI("TestDB", "web", null, "localserver");
@@ -172,7 +172,9 @@
172172
$result = $fmdb->postalcode->getRecord($recId);
173173
if (!is_null($result)) {
174174
foreach ($result as $record) {
175+
$x = $record->{"f3"};
175176
echo htmlspecialchars("f3: {$record->f3},", ENT_QUOTES, "UTF-8");
177+
echo htmlspecialchars("f3: {$x},", ENT_QUOTES, "UTF-8");
176178
echo htmlspecialchars("f7: {$record->f7},", ENT_QUOTES, "UTF-8");
177179
echo htmlspecialchars("f8: {$record->f8}", ENT_QUOTES, "UTF-8") . "<hr>";
178180
echo "<hr>";

src/Supporting/FileMakerLayout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private function buildScriptParameters(array|null $param): array
110110
$request[$key] = $param[$key];
111111
}
112112
}
113-
if (!empty($request)) {
113+
if (!empty($request) && !is_null($param)) {
114114
switch (count($request)) {
115115
case 1:
116116
$request["script"] = $param[0];

0 commit comments

Comments
 (0)