note
Eily
<p>What's the exact error message? It might have a little more information on what is happening exactly (or where it is happening).</p>
<p>The "uninitialized value" warning is actually disabled by default, and enabled either with [doc://use] [doc://warnings], or the [doc://perlrun|-w / -W / -X options], or the [doc://perlvar|$^W] variable. So maybe there's some config somewhere or another module that changes warnings activation. You can try this in your test version to see if the warnings appear:
<c>{
use warnings 'uninitialized';
$update_or_insert->bind_param(10, $thing_id, SQL_INTEGER);
$update_or_insert->bind_param(11, $action, SQL_VARCHAR );
}</c>
If the warning appears, your code had the issue all along, but just didn't tell you about it. In that case, perl just silently replaces your value by either "" or 0 depending on context, so you can do it explicitly to obtain the same result.</p>
<p>You could also try <c>no warnings 'uninitialized';</c> in your shadow test version, but it's better to fix the warnings than just hide.</p>
<p>Edit: it looks like -X will disable all warnings regardless of whatever else you try to do, so the <c>use warnings;</c> wouldn't have any effect in that case.</p>
11113512
11113512