reference/exec/functions/passthru.xml
b412bbd26214f7281ac7dd858710e09952a275f2
...
...
@@ -10,9 +10,9 @@
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
12
<methodsynopsis>
13
-
<type>void</type><methodname>passthru</methodname>
13
+
<type class="union"><type>false</type><type>null</type></type><methodname>passthru</methodname>
14
14
<methodparam><type>string</type><parameter>command</parameter></methodparam>
15
-
<methodparam choice="opt"><type>int</type><parameter role="reference">return_var</parameter></methodparam>
15
+
<methodparam choice="opt"><type>int</type><parameter role="reference">result_code</parameter><initializer>&null;</initializer></methodparam>
16
16
</methodsynopsis>
17
17
<para>
18
18
The <function>passthru</function> function is similar to the
...
...
@@ -42,10 +42,10 @@
42
42
</listitem>
43
43
</varlistentry>
44
44
<varlistentry>
45
-
<term><parameter>return_var</parameter></term>
45
+
<term><parameter>result_code</parameter></term>
46
46
<listitem>
47
47
<para>
48
-
If the <parameter>return_var</parameter> argument is present, the
48
+
If the <parameter>result_code</parameter> argument is present, the
49
49
return status of the Unix command will be placed here.
50
50
</para>
51
51
</listitem>
...
...
@@ -57,16 +57,50 @@
57
57
<refsect1 role="returnvalues">
58
58
&reftitle.returnvalues;
59
59
<para>
60
-
&return.void;
60
+
&return.nullorfalse;
61
61
</para>
62
62
</refsect1>
63
63

64
+
<refsect1 role="errors">
65
+
&reftitle.errors;
66
+
<para>
67
+
Will emit an <constant>E_WARNING</constant> if <function>passthru</function>
68
+
is unable to execute the <parameter>command</parameter>.
69
+
</para>
70
+
<para>
71
+
Throws a <classname>ValueError</classname> if <parameter>command</parameter>
72
+
is empty or contains null bytes.
73
+
</para>
74
+
</refsect1>
75
+

76
+
<refsect1 role="changelog">
77
+
&reftitle.changelog;
78
+
<informaltable>
79
+
<tgroup cols="2">
80
+
<thead>
81
+
<row>
82
+
<entry>&Version;</entry>
83
+
<entry>&Description;</entry>
84
+
</row>
85
+
</thead>
86
+
<tbody>
87
+
<row>
88
+
<entry>8.0.0</entry>
89
+
<entry>
90
+
If <parameter>command</parameter> is empty or contains null bytes,
91
+
<function>passthru</function> now throws a <classname>ValueError</classname>.
92
+
Previously it emitted an <constant>E_WARNING</constant> and returned &false;.
93
+
</entry>
94
+
</row>
95
+
</tbody>
96
+
</tgroup>
97
+
</informaltable>
98
+
</refsect1>
99
+

64
100
<refsect1 role="notes">
65
101
&reftitle.notes;
66
102
&warn.escapeshell;
67
103
&note.exec-bg;
68
-
&note.exec-path;
69
-
&warn.sm.exec;
70
104
</refsect1>
71
105

72
106
<refsect1 role="seealso">
...
...
@@ -82,7 +116,6 @@
82
116
</para>
83
117
</refsect1>
84
118
</refentry>
85
-

86
119
<!-- Keep this comment at the end of the file
87
120
Local variables:
88
121
mode: sgml
89
122