We propose a linear-optical implementation of a hyperentanglement-assisted quantum error-correcting code. The code is hyperentanglement-assisted because the shared entanglement resource is a photonic state hyperentangled in polarization and orbital angular momentum. It is possible to encode, decode, and diagnose channel errors using linear-optical techniques. The code corrects for polarization flip errors and is thus suitable only for a proof-of-principle experiment. The encoding and decoding circuits use a Knill-Laflamme-Milburn-like scheme for transforming polarization and orbital angular momentum photonic qubits. A numerical optimization algorithm finds a unit-fidelity encoding circuit that requires only three ancilla modes and has success probability equal to 0.0097.